Giter Site home page Giter Site logo

julienqnn / discord-bot-embed-reaction Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 0.0 18 KB

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: MIT License

Python 97.88% Shell 2.12%
bot discord discord-bot python

discord-bot-embed-reaction's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.