Edi Discord Bot is a versatile assistant for Discord, perfect for managing music and organizing events, especially role-playing game sessions. It includes several modules (cogs), such as a music player that utilizes YouTube resources and an event organizer to facilitate the scheduling of meetings or game sessions.
- Music: Full control over a music queue with commands for playing, pausing, resuming, and skipping tracks.
- Event: Creates polls to determine meeting dates and manages related events using two methods: through Discord with
pick
, and through the Framadate website withdate
, with the latter being recommended. - Utils: Various utility tools for managing the bot and messages on the server.
- Language: All messages sent by the bot are exclusively in French.
Commands can be used through the traditional prefix !
or as slash commands.
Most commands have parameters that can be viewed and used via slash commands, providing clear and interactive usage options.
- Event
date
: Creates a poll on the Framadate website for scheduling.pick
: Creates a poll directly on Discord proposing multiple dates.
- Music
join
: Joins a voice channel.leave
: Leaves the voice channel and stops the music.loop
: Loops the current track.np
: Displays the currently playing track.pause
: Pauses the current track.play
: Plays a track or adds it to the queue.queue
: Displays the list of tracks in the queue.resume
: Resumes a paused track.skip
: Skips to the next track.
- Utils
delete_edi_messages
: Deletes Edi's messages.sync
: Synchronizes the commands for the guild.
- Send messages
- Manage messages
- Join voice channels
- Speak in voice channels
- Manage channels
To operate the bot, certain environment variables need to be configured:
DISCORD_TOKEN = "Your bot token here"
GUILD_ID = "Your server ID"
VOICE_CHANNEL_ID = "Voice channel ID"
APP_ID = "Application ID"
The Music cog of Edi Discord Bot requires FFmpeg to be installed on the system where the bot is running. FFmpeg is used to process audio streams, which is essential for the music playback functionality.
- Windows:
- Download the FFmpeg binaries from FFmpeg.org.
- Extract the downloaded zip file.
- Add the path to the FFmpeg bin folder (e.g.,
C:\path\to\ffmpeg\bin
) to your system's PATH environment variable.
- macOS:
- You can install FFmpeg using Homebrew by running:
brew install ffmpeg
- You can install FFmpeg using Homebrew by running:
- Linux:
- Most Linux distributions can install FFmpeg directly from the package manager. For example, on Ubuntu, you can run:
sudo apt install ffmpeg
- Most Linux distributions can install FFmpeg directly from the package manager. For example, on Ubuntu, you can run:
Ensure that FFmpeg is correctly installed and accessible from the command line by running ffmpeg -version
. If the command prints the FFmpeg version information, then it is installed correctly.
-
Install Python 3.8 or newer.
-
Clone this repository or download the files:
git clone https://github.com/rfulop/edi-discord-bot.git
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Set up the required environment variables in a
.env
file at the project's root -
Launch the bot with:
python main.py
After adding the bot to your Discord server, it may need specific permissions to operate correctly. Ensure that the bot has the necessary permissions in each channel where it needs to operate.
To ensure that all commands are available on your server, use the !sync
command to load and synchronize the bot commands with your Discord server.
Use commands prefixed by !
or as slash commands as described in the commands section. For example, to start playing music, type !play <URL or search term>
or /play <URL or search term>
.