Skip to content

Own a discord bot to send vouchers (or anything else) to users of your discord server using "discord reactions" on a pre-defined embed / message.

License

Notifications You must be signed in to change notification settings

JulienQNN/discord-bot-embed-reaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-bot-embed-reaction

Python Discord.py 2.0 GitHub forks GitHub stars GitHub license

An easy to use system for your discord server !

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 !

Features

  • 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

Installing

Requirements

  • Python 3.8 or higher, to use Python !
  • Discord.py 2.0 ⚠️ if you already have an old discord.py version (like the 1.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

First implementation

Fill .env

  • 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.
Capture-d-cran-2022-05-10-102345 Capture-d-cran-2022-05-10-102345

Fill helpers.py (Optional)

  • Customize the different options of embeds, styles, role restrictions and more. Everything is explained in comments in the file.

Start setup.py

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 !

discord-bot-embed-reaction.gif

Fill again .env file

  • 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.

Start main.py

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 !

22e0e195205d81752.gif

License

Licensed under the terms of the MIT License.

About

Own a discord bot to send vouchers (or anything else) to users of your discord server using "discord reactions" on a pre-defined embed / message.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published