PyThonBotproject is a small Python project created for fun, with the aim of learning how to use the discord.py library to create Discord bots.
To run this project, you will need to install the discord.py library. You can do this by executing the following command in your terminal:
pip install discord
Important
Make sure you also modified your assets/config.json
file containing the token for your Discord bot.
-
Install Dependencies: Run
pip install -r requirements.txt
to install all necessary dependencies. -
Get a Discord Token: Visit the Discord Developer Portal to create a new application.
Then, add a bot to this application and copy the generated token. -
Edit or Create a
congig.json
File: Create the file in theassets
directory of your project and paste the Discord bot token there.
Warning
Avoid committing your confing.json
file to a public repository to prevent unauthorized access to your Discord bot / Data.
-
Run the Bot: Use your terminal to navigate to the directory containing the main Python file of your bot. Then, execute the following command:
python bot.py
-
Invite the Bot to Your Discord Server: Use the invitation link generated by the Discord Developer interface to add your bot to your Discord server.
-
All Commands are in the
commands
folder.
Contributions are welcome! If you'd like to contribute to this project, please create an issue to discuss the changes you'd like to make.
This project is distributed under the MIT license. See LICENSE for more information. Copyright (c) 2024 Corentin Lallement
Note
Bases for python codes are comming from discord.py documentation.
Caution
Be careful when granting permissions to your Discord bot. Only give it the permissions it needs to function properly to avoid potential security risks.