Discord bot to chat with Cleverbot. Uses the cleverbotfree library to
communicate via a headless Firefox browser. Also does some other cool stuff.
- Ubuntu >= 18.04
- wget >= 1.19.4
- Mozilla Firefox >= 79.0
- Python >= 3.6.9
- python3-pip >= 20.2.2
- cleverbotfree>=1.2.4
- discord.py>=1.4.0
- requests>=2.24.0
- selenium>=3.141.0
- zxcvbn>=4.4.28
Drivers
Selenium requires a driver to interface with the headless browser. Firefox
requires geckodriver, which needs to be installed before this module can be
used. Make sure it’s in your PATH, e.g., place it in /usr/bin
or /usr/local/bin
.
You can download geckodriver at https://github.com/mozilla/geckodriver/releases
Failure to observe this step will give you an error like:
"Message: ‘geckodriver’ executable needs to be in PATH."
Discord
Head over to DiscordApp and create a new app.
Record your Client_ID. On the left, click Bot, and then Add Bot.
Once you are done setting up your bot, save your Client_ID, Token, and Client Secret in a safe place.
Environment Variables
Add to your .bashrc file:
export CLEVERCORD_TOKEN=<Token>
export CLEVERCORD_CLIENT_ID=<Client_ID>
To build the docker container, clone this repository and from inside the main directory run:
docker build --build-arg TOKEN=${CLEVERCORD_TOKEN} \
--build-arg CLIENT_ID=${CLEVERCORD_CLIENT_ID} \
-t clevercord .
To run the container:
docker run clevercord
When bot is active in server, type &help
for a list of commands,
or type &chat [message]
to talk to the bot.