A simply fun Discord bot for your Discord server.
/help
-> List bot commands/apex-not-my-main
-> "Not My Main", generates a random Apex Legends champion/pick-one
-> Input a comma separated list of options and pick one randomly/coin-flip
-> Flip a coin/d6
-> Roll a d6/d20
-> Roll a d20/d-num
-> Roll a die with input number of sides/get-rankings
-> Get various game rankings of server members/get-game-info
-> Get your information about a game from the RAWG API
- Post weekly free Epic Games Store games every Thursday to
#general
channel. Logic inbot-scripts/epic-free-games
. - Each morning check for server members who ranked up and post to
#general
channel. Logic inbot-scripts/daily-rankings
. - On the first of every month post a message to the
#the-feed
channel with server stats from the previous month. Logic inbot-scripts/message-history
.
- If certain keywords are used in a message (like "dog"), the bot will react with the related emoji (like 🐶). Logic in
bot-scripts/specialEmojis.js
.
Core NPM Packages:
APIs:
- Create your bot and invite to your discord server (this bot will be what is running "freeBrunch-discord-bot", will be source of tokens, clientids, etc.)
Deployment and bot slash command update automated through GitHub Actions stored in this repo for Prod/Dev Discord servers.
- Obtain dedicated self hosted server. In my case a Raspberry Pi 4.
- Setup SSH auth to self hosted server and ensure server is accessable via internet.
git clone
freeBrunch-discord-bot to home directory (or directory you will cd into in .github/workflows/deploy-bot.yml).cd
to directory and run:
npm install
npm install pm2@latest -g
pm2 start index.js --name freeBrunch-bot
(or chosen name you will specify in .github/workflows/deploy.bot.yml)
Now the self hosted server is ready for the deploy-bot.yml
github action to pull latest changes and restart the bot.