Official Discord Bot from DICE 2023, Oulun Yliopisto
https://github.com/kkrypt0nn/Python-Discord-Bot-Template
- Clone/Download the repository
- To clone it and get the updates you can definitely use the command
git clone https://github.com/TheRealDarkCoder/Dice-Bot-Oulu
- To clone it and get the updates you can definitely use the command
- Create a discord bot here
- Get your bot token
- Invite your bot on servers using the following invite:
https://discord.com/oauth2/authorize?&client_id=YOUR_APPLICATION_ID_HERE&scope=bot+applications.commands&permissions=PERMISSIONS (
Replace
YOUR_APPLICATION_ID_HERE
with the application ID and replacePERMISSIONS
with the required permissions your bot needs that it can be get at the bottom of a this page https://discord.com/developers/applications/YOUR_APPLICATION_ID_HERE/bot)
To set up the bot it was made as simple as possible.
There is config.json
file where you can put the
needed things to edit.
Here is an explanation of what everything is:
Variable | What it is |
---|---|
YOUR_BOT_PREFIX_HERE | The prefix you want to use for normal commands |
YOUR_BOT_INVITE_LINK_HERE | The link to invite the bot |
To set up the token you will have to either make use of the .env.example
file, either copy or rename it to .env
and replace YOUR_BOT_TOKEN_HERE
with your bot's token.
Alternatively you can simply create an environment variable named TOKEN
.
To start the bot you simply need to launch, either your terminal (Linux, Mac & Windows), or your Command Prompt ( Windows) .
Before running the bot you will need to install all the requirements with this command:
python -m pip install -r requirements.txt
After that you can start it with
python bot.py
Note You may need to replace
python
withpy
,python3
,python3.11
, etc. depending on what Python versions you have installed on the machine.
- Python 3.11.5
- Why? Everyone can contribute.