Chatty Cathy is an artificial intelligence (AI) chat bot for Discord server. It can also check Bitcoin prices and is easily extended with new commands. It is written in Python 3. The only custom command provided currently is the ?bitcoin command, implemented as an example for you to easily add your own.
The chat bot intelligence is powered by AIML. It comes packaged by default with the Alice bot set of XML files. You can also add your own AIML files to modify the chat behavior in the cathy/aiml/custom folder. You can follow this tutorial to learn more about using AIML with Python: AI Chat Bot in Python with AIML.
Bot shows up in the user list:
Sample bot chat:
Chat with Cathy in the DevDungeon Discord server channel #chat-with-cathy. https://discord.gg/unSddKm
If you plan to modify or extend the bot, you should download the source from GitHub. You may choose to fork the repository so you have your own project to work in. Download the source from https://github.com/DevDungeon/ChattyCathy and install using setup.py.
python setup.py install
Or, you can use pip to install
pip install cathy
cathy --help # Test
Discord chat bot using AIML artificial intelligence
cathy <channel> <token>
<channel> Name of channel to chat in
<token> Bot's Discord API token
-h --help Show this screen.
Creating a Bot User on Discord
Note that you need to be a server owner to do these actions. You can create your own Discord server for free to test. If you want to run the bot on your own server you need to first create a bot user and obtain its token. First, go to your applications page in the Discord dashboard: https://discordapp.com/developers/applications/me. Create a new app, and then in the app settings page, add a bot to the application. Once the bot is created for the application, obtain the bot token by clicking "Click to reveal" right under the bot's username where it says "Token". That is the token you need to pass to the program when running it.
Adding Bot to a Server
Once an application is created, you need the Client ID available on the application details page in the first section labeled "App Details". Once you have the client ID, use this URL to authorize that client ID. It will ask you what server you want to add it to. Replace the XXXXXXXX with the Client ID.
After you have authorized the app for your server, you can run the bot and provide it the bot token (not the client ID), and the name of the channel you want it to chat in. It needs the channel name so it doesn't respond to every message in every channel. If you authorize the bot for multiple servers, the servers will all need the same channel name for the bot to chat. For example, on the DevDungeon Discord server, the channel is #chat-with-cathy.