https://discord.com/api/oauth2/authorize?client_id=613364681750609943&permissions=8&scope=bot
This little project started as something to insult friends with a random api. It since has become a fun project. I use it to learn and try new concepts while adding new features to the bot.
- Some highlights and things I've learned from this bot:
- 6 different API's (insult, praise, gif, cowspeak)
- PostgreSQL queries to update and get statistics of bot
- Learned/implemented about object oriented programming and polymorphism on statistics.js
- Learned/implemented a command handler for ease of adding commands and just general code viewing
/insult @person
/praise @person
/gif
/gif searchterm
/moo sentence
/8ball question
/timer 5 mins
/choose this or that?
/dadjoke
/poll Which number is better? +1 +2
/comment hey can we add this feature?
/help for a list of commands
API links:
InsultsNo longer works- Insults
PraisesNo longer works- Praises
- Gifs
- CowSay
8BallRIP from Heroku- 8Ball --possible replacement. WIP 12/19/22
- dadJoke
- Need Node.js and Discord.js installed
- Create discord bot account and add it to your server. Add token to .env
- git clone https://github.com/tdnicola/discord_insult-bot
- npm i
- create .env file based on env.sample file
- TOKEN=discord bot token
PREFIX=currently !--Unused now, changed to slash commands- GIF_TOKEN=giphy token
- DATABASE_URL=heroku postgres string (if wanted to your own tracking. Would have to set up own server)
- comment out stat api calls if no need for tracking stats
- node bot.js
- comment out sendToOatmeal function in interactionCreate.js Or change the userID to yours. (This is sending errors to me for troubleshooting)
Command | Counts |
---|---|
Insults: | 804 |
Praises: | 446 |
Gifs: | 704 |
CowSpeaks: | 107 |
Thanks given: | 6 |
8Balls: | 146 |
Incorrect channels (noobs): | 9 |
deployed on heroku Local home server