.gitlab/issue_templates | ||
src | ||
.envexample | ||
.gitignore | ||
.gitlab-ci.yml | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
requirements.txt |
Bot Discord
Setting up
You have to replace TOKEN_DISCORD
, PREFIX
, TOKEN_GENIUS
, TOKEN_REDDIT_CLIENT_ID
, TOKEN_REDDIT_CLIENT_SECRET
, TOKEN_REDDIT_USER_AGENT
and TIMEZONE
with your desired values. You must also specify a path to the folder where the database will be.
With a docker-compose or in command line:
docker run -d \
--name="KassouBot" \
registry.gitlab.com/confreriedukassoulait/kassoubot \
--TOKEN_DISCORD="yourTokenDiscord" \
--TOKEN_GENIUS="yourTokenGenius" \
--TOKEN_REDDIT_CLIENT_ID="yourRedditClientID" \
--TOKEN_REDDIT_CLIENT_SECRET="yourRedditClientSecret" \
--TOKEN_REDDIT_USER_AGENT="yourRedditUserAgent" \
--TIMEZONE="yourTimezone" \
--PREFIX="yourPrefix" \
-v /here/your/path/:/db
You can add the environment variable DEACTIVATE
to disable some cogs (separate the cogs with commas and no spaces between).
You can add the environment variable REGION_DISCORD
to force the Lavalink server to use your voice region.
To find reddit tokens, go to this site and here are the instructions: redirection uri (for copy/paste) : http://localhost:8080
To find Genius token, go to this site, login to your account
and on the left select New API Client
. Fill the field with what you want then click Save
. Now your token is the CLIENT ACCESS TOKEN
.
Add the bot to your server
- In the Discord Dev Portal create an application, and make sure it's a
Bot
(third tab). - To invite it, go to the
OAuth2
(second tab) tab, select the scopesbot
(required) andapplications.commands
(for the slashs commands) and in the bot permissions selectAdministrator
(You can select manually at your own risk). - You have the link to copy above between the two blocks
scopes
andpermissions
. - If you need help, you can join my Discord.
Features
- Using discord.py (rewrite)
- Everything is explained by doing the
help
command. - Using SQLite for the database.
- Using Lavalink with a Wavelink client.
Launching locally
If you want to run it without Docker, create an .env file to store variables in the root folder (there is an example here).
Install all the requirements by doing python3 -m pip install -r requirements.txt
.
Then if youre using music, download latest version of Lavalink inside the Lavalink
folder.
Simply run python3 main.py
inside the src
folder to launch the bot in the repo folder.