This repository is a Python project based on Discord.py 2.0, it will run a discord bot to send vouchers (or anything else) to users using the reactions of a pre-defined embed or message. This project is extremely customizable and just waiting for your ideas and creativity, feel free to browse the excellent documentation and join the official discord.py server !
- Bot reacts according to precise reaction
- Restriction based on discord roles
- Bot sends private messages in the form of an fully customizable discord embed
- Using the new buttons
- Python 3.8 or higher, to use Python !
- Discord.py 2.0
⚠️ if you already have an old discord.py version (like the1.7.3
version) you need to uninstall it first with :pip uninstall discord
Install the Discord.py 2.0 library :
git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]
Install this repository :
git clone [email protected]:JulienQHN/discord-bot-embed-reaction.git
$ cd discord-bot-embed-reaction
$ python3 -m pip install -U .[voice]
- Dotenv package to load environnements variables
pip install python-dotenv
- Rename
.env.example
file to.env
to make it usable. - Fill
DISCORD_TOKEN="YOUR TOKEN"
with your bot token, you can create one on your discord developer portal, if needed a step by step wiki is available here, don't forget to enable the Privileged Gateway Intents in the bot category on your discord developer portal and invite your bot on your discord server ! - Fill
CHANNEL_ID = 999999999999999999
by replacing the 18 digit number with the desired channel id where your embed will arrive. You can find it by right clicking on it in the channel list of a discord server.
- Customize the different options of embeds, styles, role restrictions and more. Everything is explained in comments in the file.
At the root of the project :
$ python3 setup.py
If everything worked correctly you should receive a message in the channel you have chosen like on the GIF below !
- Fill
MESSAGE_ID = 999999999999999999
by replacing the 18 digit number with the created message id. You can find it by right clicking on it as in the picture above.
At the root of the project :
$ python3 main.py
If everything worked correctly, the bot should react and send a message to users that adds a reaction to the message you defined earlier. Don't forget to populate your vouchers.json
file with a list of vouchers or any other data ! The GIF below show you what this code does with the basic parameters, customize them as you wish !
Licensed under the terms of the MIT License.