TragicSimp is a discord bot that can send memes, facts, jokes, quotes, and track user stats. This bot has a leveling system which rank user based on their commands in a channel created by Bot
For more information visit the Github page
How does it work?
we are using the discord.py library. This Discord.py library revolves around the concept of the event. An event is something you listen to and respond to an event. Discord.py is an asynchronous library so things are done with callbacks. the callback is a function that is called when something else happens. For Example: when the user types the command pls fact then in discord bot will receive an event about it then the bot responds to it with fact.
how does fact, joke, quote work?
When the user types the command pls factor pls joke or pls quote then the tragicsimp bot fetches the facts or joke from API and it creates an embed message then the bot sends that message to the user.
how does meme work?
When the user types the command pls meme then the tragicsimp bot fetches the meme from the MongoDB database and it creates an embed message and sends it to the user. For a meme, we are using a database because fetching from the API takes some time to return a response as compared to the database. In the database, we are storing the top memes of the week. Every week bot deletes old memes and fetches new top memes of the week, adds them to the database. We have programmed the bot in such a way that its probability of repetition of the meme is increasing on every pls meme command.
how does leveling system work?
When the user type command for a joke, fact, quote, or meme bot will increase their XP based on that XP bot will calculate the level of the user. When the user will reach levels 5,10,15,20 then the bot will assign a certain role to a user. Based on their level and XP user rank is decided