iammathavan / Discord-Bot

Discord Bot built using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord Bot built using python

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.

Installation

Installing Requirements

  pip install -r requirements.txt

Environment Variables

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

Few more changes

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.

Screenshot

Screenshot 2022-05-03 145320

Running the Bot

To run the bot

  python3 main.py

Documentation

discord.py

python

json

requests

giphy_client

praw

Invite the Bot

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.

NOTE

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. 

INVITE the bot

🔗 Links

linkedin

License

MIT

About

Discord Bot built using Python

License:MIT License


Languages

Language:Python 99.9%Language:Procfile 0.1%