Cathy Discord AI chat bot documentation!

Artificial intelligence (AI) chat bot for Discord written in Python

What is Cathy?

Cathy is an artificial intelligence (AI) chat bot for Discord server. It is easily extended with new commands. It is written in Python 3. You can invite the DevDungeon Chatty Cathy to your server or run your own version.

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.

Also check out the Help Desk Bot which is another DevDungeon project. It’s a simple bot that checks Bitcoin price, has a magic 8 ball command, and a LMGTFY feature. Find it at https://www.devdungeon.com/content/help-desk-bot

Chat with existing bot

You can join the DevDungeon.com Discord server and chat with the bot in the #chat-with-cathy channel.

Use this link to join the Discord server: https://discord.gg/unSddKm

Invite existing bot to your server

Chatty Cathy is a public bot that you can invite Chatty Cathy to your own Discord server. If you invite the public bot, you will need to create a channel named “chat-with-cathy” to chat with the bot. This is done to prevent the chat spam in every channel. If you want to customize the channel name you can run your own instance of the bot. Instructions are below. To invite the public bot, just visit this authorization URL directly:

Invite the bot

To invite the exiting bot to your server and chat, first invite the bot to your server and then create a channel named #chat-with-cathy.

Follow this link to invite the bot:

https://discordapp.com/oauth2/authorize?client_id=387435655925596160&scope=bot

Create the chat-with-cathy channel

Don’t forget to create the #chat-with-cathy channel. Talk in that channel.

Run your own bot

Run your own bot by following the instructions below.

Note that the cathy package requires Python < 3.7 and discord.py of version 0.16.12. Python 3.7 introduced backwards incompatible changes with the discord.py package version being used. Python 3.6.x recommended.

Installation

Install the Python package:

pip install cathy

Or download this package and install with setup.py:

python setup.py install

Running

Run on the command-line to get help:

cathy --help

Usage

Usage information:

Usage:
  cathy <channel> <token>

Options:
  <channel>     Name of channel to chat in (no hashtag)
  <token>       Bot's Discord API token
  -h --help     Show this screen.

Example usage:

# Enter the channel name with no # sign
cathy chat-with-cathy 123FFF.SECRET_TOKEN.123FFF

Getting a token

If you don’t already know how to get a token, you need to follow a few steps:

  • Create an application at https://discordapp.com/developers/applications/
  • In the application, go to Bot tab.
  • Click add bot user.
  • Go to OAuth2 tab, scroll down to Scopes section
  • Click on “bot” scope and copy the URL it provides
  • Visit the URL in your browser and accept the bot invitation to your server
  • Go back to the Bot tab
  • Copy the token from the Bot tab.

How can I create my own bot?

If you want to create your own bot, you can follow some ofthese tutorials on DevDungeon.com