Bot in french developed with discord.py (rewrite)
This repository has been archived on 2022-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Mylloon 1f29ea0d1a Changes:
discord.py 1.7.3 -> enhanced discord py main branch
pytz 2021.1 -> 2021.3
remove discord py slash command
wavelink 0.9.10 -> pomice 1.1.1
discord together 1.1.1 -> 1.2.1
2021-11-02 01:58:31 +01:00
.gitlab/issue_templates Adding some help to fill the fields 2021-08-02 11:18:44 +02:00
src Update Lavalink main branch 2021-11-01 22:44:37 +01:00
.envexample add env example 2021-08-01 20:27:04 +02:00
.gitignore remove venv files 2021-08-18 21:16:44 +02:00
.gitlab-ci.yml bringing back old push 2021-08-16 20:21:39 +02:00
.gitmodules moved lavalink to main branch 2021-08-18 23:10:51 +02:00
docker-compose.yml add custom network 2021-08-16 18:55:50 +02:00
Dockerfile update python to 3.9.5 2021-08-16 09:45:00 +02:00
LICENSE Create LICENSE 2021-03-28 01:46:26 +01:00
README.md Add mirror and fast clone method 2021-11-01 22:37:52 +01:00
requirements.txt Changes: 2021-11-02 01:58:31 +01:00
start.bat strip newline 2021-08-15 18:35:49 +02:00
start.sh adding spaces 2021-08-15 18:01:24 +02:00

Bot Discord

Version Build Mirror

Features

  • First, there is a strong help command who explain every single commands.
  • Slash commands support (use Discord Interactions).
  • Party games activities support (use Discord Together).
  • Music support (use Lavalink with the Wavelink client).
  • Reminders and ToDos list support (with a weekly reminder of the ToDos list in DM).
  • Poll support.
  • Meme from reddit and NSFW pictures support.
  • Basics commands and simple games, don't mind on opening an issue if you wan't your idea to be added to the bot.
  • Use discord.py (rewrite).
  • Use SQLite for the database.

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:

First you need to create a dedicated network for our containers:

On Debian-based distro:

docker network create -d bridge default-kassoubot 2> /dev/null || true

On Windows:

docker network create -d bridge default-kassoubot 2> NUL || REM

Then you can create our containers:

docker run -d \
    --name="Lavalink" \
    -p 2333:2333 \
    --network="default-kassoubot" \
    --restart=unless-stopped \
    registry.gitlab.com/confreriedukassoulait/lavalink:latest \
    lavalink \
    && \
docker run -d \
    --name="KassouBot" \
    -e TOKEN_DISCORD="yourTokenDiscord" \
    -e TOKEN_GENIUS="yourTokenGenius" \
    -e TOKEN_REDDIT_CLIENT_ID="yourRedditClientID" \
    -e TOKEN_REDDIT_CLIENT_SECRET="yourRedditClientSecret" \
    -e TOKEN_REDDIT_USER_AGENT="yourRedditUserAgent" \
    -e TIMEZONE="yourTimezone" \
    -e PREFIX="yourPrefix" \
    -v /here/your/path/:/opt/db \
    --network="default-kassoubot" \
    --restart=unless-stopped \
    registry.gitlab.com/confreriedukassoulait/kassoubot
  • You shouldn't change at least the service name of the Lavalink container because the bot is using his DNS name (and it's based on the service's name).
  • 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: 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 scopes bot (required) and applications.commands (for the slashs commands) and in the bot permissions select Administrator (You can select manually at your own risk).
  • You have the link to copy above between the two blocks scopes and permissions.
  • If you need help, you can join my Discord.

Launching locally

If you want to run it without Docker, clone the repo and his submodules by doing this command in the git folder:

git clone git@gitlab.com:ConfrerieDuKassoulait/KassouBot.git --recursive

If you already cloned the repo without the --recursive arg you can do that in the git folder :

git submodule update --force --recursive --init --remote

Then 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 (I recommend using virtualenv to not interfere with your system).

If you need to install Java, there is some step to have the same as the Docker image built for the project, on Debian-based distro:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
sudo apt update -y
sudo apt install adoptopenjdk-16-openj9 -y

On Windows just go to their site.

Then, simply run start.bat if you are on Windows or start.sh if on Debian-based distro to launch the bot.