A personal discord bot with some useful and some not so useful commands.
As all good things are three, this is the third iteration of the discord bot I built. The first one was one of my first projects when I started to learn programming. It was a terrible mess of spaghetti without version control written in python. The second one was still written in python, way less of a mess, but still bad. I used this project to learn TS and I really fell in love with the language during development. I'm quite proud of this one.
I used discord.js and took some architectual inspiration from KevinNovaks template
please use /help for the most updated list of commands and further instructions on how the use them. Seriously, I put a lot od effort into the help commad. Please use it.
| Category | Command | Subcommand | Description |
|---|---|---|---|
| Anime | /anime | search | search for a series |
| schedule | get the schedule of all airing anime this week | ||
| /uwuify | make text kyute and cwinge uwu | ||
| Moderation | /ban | bans a user | |
| /unban | unbans a user | ||
| /kick | kicks a user | ||
| /purge | deletes the last x messages in a channel | ||
| /timeout | mutes a user | ||
| /unitmeout | unmutes a user | ||
| DnD | /bless | reminds you that you have bless up | |
| /roll | roll polyhedral dice | ||
| Misc | /bofh | generate a bastard-operator-from-hell-like excuse | |
| /choose | like eightball but less vague | ||
| /coinflip | take a wild guess | ||
| /dadjoke | post a dad joke | ||
| /eightball | as a digital ball for advice | ||
| /hug | display your affection towards another user | ||
| /poll | start a poll with up to 10 options | ||
| browse reddit | |||
| /sticker | add | add a sticker to your server | |
| post | post a sticker | ||
| list | get a list of all stickers on your server | ||
| /tarot | draw | draw a tarot card | |
| search | get infos about the meaning of a card | ||
| NSFW | /danbooru | browse danbooru | |
| /r34 | ( ͡° ͜ʖ ͡°) | ||
| /lewds | a stream of carefully selected pieces of art for cultured people | ||
| PokéMon | /dex | pokemon | search for PokéMon |
| ability | search for an abilty | ||
| berry | search for a berry | ||
| item | search for items | ||
| move | search for moves | ||
| nature | search for natures | ||
| pdr | find out what moves are effective against the selected type(s) | ||
| Exp | /exp | user | display a users exp on this server |
| leaderboard | display a leaderboard for this server | ||
| Utility | /help | get an overview about all commands or further details on a specific one | |
| /info | display information about the bot | ||
| /ping | pong! | ||
| /remind | set | set a reminder and get pinged at the specific time | |
| list | display a list of all reminders and delete unneeded ones |
- fill out
config/config_template.jsonwith your credentials and db config - create a
.envfile withDATABASE_URLset to the connection string to your db. Prisma needs this. - make sure your db also runs where you configured it would
- run the bot via
npm run prod:db. This will automatically migrate your db.
This project also gets built into a docker image on docker hub. An example config including db could look like this:
version: '3'
services:
rankabot:
container_name: "rankabotmk3"
image: rankarusu/rankabotmk3
restart: 'always'
depends_on:
database:
condition: service_healthy
env_file:
- .env
volumes:
- /path/to/your/config:/app/config
database:
container_name: "postgres"
image: postgres
restart: 'always'
ports:
- '5432:5432'
env_file:
- .env
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
volumes:
- /path/to/volume/data:/var/lib/postgresql/data