Welcome to the repository for the Alisa Discord bot. Due to having lost the previous iteration of the bot, and discovering that it doesn't compile/run on some IoT devices (Raspberry Pi in this case), I decided to start this little project. The aim is to have a personalized Discord bot that can be run on a low powered device.
- Can connect to Discord's developer bot service
- Appointing/removing roles through commands
- Alisa responses in chat
- Spam messages check and deletion
- Directed welcome message when new member joins the server
- Send warnings through DMs
- Error handling
- Admin/mod command tools for configuration
- Local role database that can be updated through discord commands
- Incorporate different conversation model (run locally?)
Alisa bot uses the Discord.py API wrapper. Due to this to run Alisa bot you need two things: python3 and pip (or another package manager) to get the required packages.
install python
install pip
Go into the desired terminal (e.x: command prompt) And install the required packages to run this program
pip install -r requirements.txt
Clone the project
git clone git@github.com:Mark-Shun/Alisa-bot.git
Go to the project directory
cd Alisa-bot
Run the Alisa bot (note: make sure that Python3 is run, some terminals require entering python3 instead of just python)
python Alisa.py
To run the bot on a testing server, parse the appropriate flag
python Alisa.py dev
The code uses tokens for two bots, namely the main Alisa bot and a testing bot. To get these tokens and key the script retrieves them from the system environment. Make sure they're stored in the environment with the following variable names:
- ALISA_BOT_TOKEN
- ALISA_TEST_BOT_TOKEN
Configuration is done in the config.py file, tokens, keys and variables can be found there.
The code is specifically written for the Alisa Discord server, it also contains checks to see if it is running on said server. However with tinkering it could be used for other servers as well, but this code is not intended to be used as a template.