Basic Discord bot that pings you when a new anime episode or manga chapter is released, based on your MyAnimeList account. I couldn't find any bot that does this, so I wrote one myself.
This is just a personal bot, meaning it only serves one user at a time, so feel free to use it for yourself.
Currently it uses following sites:
Just set your MyAnimeList profile with the !setProfile
command and you're good to go. For more information on the other commands, you can check the wiki page or use the !help
command.
-
Set up Discord application:
- Go to https://discordapp.com/developers/applications/me
- Create a new application and a new bot
- Enable
PRESENCE INTENT
at thePrivileged Gateway Intents
section - Make sure you save the bot token somewhere for the following steps
- You can generate an invite link for your bot at the
OAuth2 URL Generator
section under theOAuth2
tab to add it to your server
-
Set up Postgresql database
sudo -i -u postgres $ createuser <USER> -P --interactive $ createdb naotomori
Also export the configuration as:
export DATABASE_URL="dbname='naotomori' user=<DB_USER> host='localhost' password=<DB_PASSWORD>"
-
Set up bot (make sure you are using python3.7 or greater):
pip install -r requirements.txt export DISCORD_CLIENT_TOKEN=<TOKEN> python main.py
Alternatively, you can use Heroku to host the discord bot for free. There are already config files in this repository, so the deployment should be easy:
- Follow step 1 from the Local Setup
- Click the button above to create the app from a template
- Start your worker in the 'Resources' tab
- That's it! Your discord bot should be running 24/7 (it actually only runs 550 hours a month if you have the 'free' version, but you can increase this to 1000 hours if you link your credit card, making it run the entire month)
Run all unit tests:
python -m unittest -v