Click to expand contents
BuffyBot uses slash commands, the available ones are
/buffy-save season episode: Saves your progress in the current season. e.g/buffy-save 1 1to save that you are watching or just finishedSeason 1 Episode 1./buffy-progress: Posts a progress bar with your status through finishing Buffy!/buffy-next: Posts the season, episode number and title of the next episode with a link to the Wikipedia page./buffy-current: Posts the season, episode number and title of the last saved episode with a link to the Wikipedia page.
The bot can also be run locally on a device, which requires Python and Poetry to be installed. BuffyBot will only be online as long as the command is running, so if you turn your computer off or close the process, BuffyBot will go offline too! However, this method is good for testing and experimentation if you don't want to faff around with Heroku π¦
- First, clone the repo using
git clone https://github.com/ekwska/buffybot - Next install the dev dependencies:
- Create a new Discord Application in the
Discord Developer Portal
- Name your app (e.g
SpikeForever) click the Create App button - Copy the apps CLIENT ID (it is called APPLICATION ID in discord) somewhere
- Click on the Bot section in the sidebar -- UNCHECK Public bot, unless you want it to be public -- CHECK Message Content Intent, this is critical for the apps functionality
- Copy the bot's TOKEN somewhere. If you forget it, you will need to regenerate it.
- Rename the file
.env.exampleto.env, and replace the value ofDISCORD_TOKENwith the bots TOKEN you copied above. - Now invite the bot to any server where you have admin privileges using the below link, making sure to replace CLIENT_ID with your client ID from above.
https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID&permissions=2147552256&scope=bot
This will give the bot:
botscopeRead Messages/View ChannelspermissionSend MessagespermissionRead Message HistorypermissionUse Slash Commandspermission
- Open a terminal and navigate to the
buffybotfolder usingcd buffybot - Run
poetry install - Run
poetry run buffybot, and you should see something like so (the bots Discord name and#identifier will be different depending on what you named the bot):
$ $ poetry run buffybot 2023εΉ΄10ζ30ζ₯ 16:15:39 WARNING discord.state Guilds intent seems to be disabled. This may cause state related issues. 2023εΉ΄10ζ30ζ₯ 16:15:39 WARNING discord.client PyNaCl is not installed, voice will NOT be supported 2023εΉ΄10ζ30ζ₯ 16:15:39 INFO root Main table of seasons/episodes exists, loading! /home/bird/Documents/src/buffybot/buffybot/bot.py:20: RuntimeWarning: coroutine 'BotBase.add_cog' was never awaited bot.add_cog(BuffyBot(bot)) RuntimeWarning: Enable tracemalloc to get the object allocation traceback 2023εΉ΄10ζ30ζ₯ 16:15:39 INFO discord.client logging in using static token 2023εΉ΄10ζ30ζ₯ 16:15:39 INFO discord.client logging in using static token 2023εΉ΄10ζ30ζ₯ 16:15:40 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: bc12366652ca2f664b8a75aa7586b416). 2023εΉ΄10ζ30ζ₯ 16:15:40 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: bc12366652ca2f664b8a75aa7586b416). 2023εΉ΄10ζ30ζ₯ 16:15:42 INFO root BuffyBot#3743 has connected to Discord! Version 2.3.2 2023εΉ΄10ζ30ζ₯ 16:15:42 INFO root Main table of seasons/episodes exists, loading! 2023εΉ΄10ζ30ζ₯ 16:15:42 INFO root BuffyBot#3743 has loaded the BuffyBot extension!
- You should have a working
BuffyBot! Test it out in your server by using:
/buffy-save 1 1to save that you are on the first episode.- Then
/buffy-progressto show how far you are through Buffy. - And then
/buffy-nextto show you the title, season and episode number of the next episode (and a handy wikipedia link).
You're now ready to slay some vampires and (ει€) destroy (ει€γγγΎγ§) pass high school, have fun! π©Έ
If you run into any issues, please open a Pull Request π
Doc formatting and setup instructions inspired by RiTA-DiscordBot β€οΈ