I have no idea what I'll call this bot.
This bot is made in Python 3.8 with the discord.py library
To set this bot up you need to do a few things.
- First off, go to the Discord developer portal
- Log in to your normal discord account
- Create a new Application
- Choose a name for the bot and have the team set to Personal
- Then, in the sidebar, navigate to
Bot
- Then press on the button that says
Add Bot
- Then choose a username for the bot
- Press on
Click to Reveal Token
- Bam, now you have your token which you will need later.
This will enable the bot to get memes and other image posts from reddit.
- Go to Reddit application preferences
- Register or Log in to Reddit
- Create a new app by clicking on
Create another app...
- Fill out the text fields
- Choose
web app
as application type - You should now see the client id and secret on the page
First of all you need to install the requirements. Make sure that you have python3 and pip3 installed and that they are both in your path. Then run this command:
pip3 install -U -r requirements.txt
This project requires a few environment variables to work. To load the environment variables I have chosen to use the Python library, python-dotenv.
Create a file at bot/.env
the content should look like this:
DISCORD_TOKEN="{Your bot token here}"
praw_client_id="{Reddit client id}"
praw_client_secret="{Reddit client secret}"
To find your Tokens etc. read Create a Reddit application and Create a Discord bot
NOTE: Please keep in mind that src/bot.py
shuld be launched from the directory src/
or else files like config.json
will not get loaded properly.
The first time you launch src/bot.py
it will create the file src/config/config.json
where you can customize the settings to your likings.
- Find a name for the bot (lol)
- Add more functionality
- Make better README
- Clean up code
- Finish TODO list (lol)
I am not really looking for any contributions, but if you do want to make one, just make a pull request and I will be sure check it out.
This project uses the GNU GPLv3 license.
The license is stated in LICENSE.