This is a discord bot project I worked on as one of my side projects. The bot is built using the Python programming language. I have worked on this bot for a few months and added features as time went on. To invoke the bot, the user must either use '$' or '.' every time before a command. For example, $meme will return a meme from Reddit in the channel. The bot has three sub-divisions of commands. They are Economic, Fun, and Administrator. First, the user can play with the bot's own currency system in the Economic portion. They can check their balance, steal coins from other players, work in a job, etc. The ultimate goal of this economic game is to make the users compete with each other and be the wealthiest user on the server. Administrator commands are only invoked if the command user has specific administrative power in the server. They are used to delete messages in channels, kick a member from the server, etc. Last but not least, the Fun commands are just some commands the users can use. They include getting gifs, memes, quotes, profile pictures, etc.
Installing Requirements
pip install -r requirements.txt
To run this project, you will need to add the following environment variables to your .env file
BOT_TOKEN
= The bot token
GIPHY_API_KEY
= Get the API key from GIPHY
PRAW_ID
= Get Praw ID from REDDIT
PRAW_SECRET
= Get it from REDDIT
REDDIT_USER
= Your Reddit username
REDDIT_PASS
= Your Reddit password
Also, change a variable in the constant.py file
BOT_ID
= Change it to your own bot's ID
Then feel free to edit the bank.json file, and change the ID to your own bot.
To run the bot
python3 main.py
Feel free to invite my bot to your own server and test it. If you have any suggestions, by all means reach out to me.
The BOT stores the users' economic data in a JSON file, even though it is alright for a smaller project. I strongly suggest using a database to store extensive data while running the Bot on multiple servers.