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.
KassouBot/README.md

46 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2020-11-29 13:24:54 +01:00
# Bot developed with [discord.py](https://github.com/Rapptz/discord.py) (rewrite) - FRENCH
2020-11-29 11:50:51 +01:00
2021-06-02 23:40:22 +02:00
[![Version](https://img.shields.io/badge/version-1.4-green?style=for-the-badge)](https://github.com/Confrerie-du-Kassoulait/KassouBot/releases/latest)
2021-04-01 16:22:31 +02:00
[![Docker Stars](https://img.shields.io/docker/stars/mylloon/kassoubot?style=for-the-badge)](https://hub.docker.com/r/mylloon/kassoubot)
[![Docker Pulls](https://img.shields.io/docker/pulls/mylloon/kassoubot?style=for-the-badge)](https://hub.docker.com/r/mylloon/kassoubot)
[![Github stars](https://img.shields.io/github/stars/Confrerie-du-Kassoulait/kassoubot?label=Github%20Stars&style=for-the-badge)](https://github.com/Confrerie-du-Kassoulait/KassouBot/stargazers)
[![Github forks](https://img.shields.io/github/forks/Confrerie-du-Kassoulait/KassouBot?label=Github%20Forks&style=for-the-badge)](https://github.com/Confrerie-du-Kassoulait/KassouBot/network)
2021-03-17 22:14:11 +01:00
## __Setting up__
2020-11-29 11:50:51 +01:00
2021-06-03 09:16:38 +02:00
You have to replace `TOKEN_DISCORD`, `PREFIX`, `TOKEN_GENIUS`, `TOKEN_REDDIT_CLIENT_ID`, `TOKEN_REDDIT_CLIENT_SECRET`, `TOKEN_REDDIT_USER_AGENT` and [`TIMEZONE`](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) with your desired values. You must also specify a path to the folder where the database will be.\
2021-03-19 23:20:09 +01:00
With a [docker-compose](https://github.com/Confrerie-du-Kassoulait/KassouBot/blob/master/docker-compose.yml) or in command line:
2021-03-17 21:36:01 +01:00
```
docker run -d \
2021-03-28 14:41:34 +02:00
--name="KassouBot" \
2021-06-08 00:02:03 +02:00
index.docker.io/mylloon/kassoubot \
2021-05-08 02:35:45 +02:00
--TOKEN_DISCORD="yourTokenDiscord" \
--TOKEN_GENIUS="yourTokenGenius" \
--TOKEN_REDDIT_CLIENT_ID="yourRedditClientID" \
--TOKEN_REDDIT_CLIENT_SECRET="yourRedditClientSecret" \
--TOKEN_REDDIT_USER_AGENT="yourRedditUserAgent" \
2021-05-07 16:44:47 +02:00
--TIMEZONE="yourTimezone" \
2021-06-03 08:07:53 +02:00
--PREFIX="yourPrefix" \
2021-06-13 22:41:05 +02:00
-v /here/your/path/:/db
2021-03-17 21:36:01 +01:00
```
2020-12-11 11:25:52 +01:00
To find reddit tokens, go to [this site](https://www.reddit.com/prefs/apps) and here are the instructions: ![instructions](https://i.imgur.com/tEzYKDA.png)
2020-11-29 11:50:51 +01:00
*redirection uri (for copy/paste) : http://localhost:8080*
2020-11-29 11:50:51 +01:00
2021-03-17 22:14:11 +01:00
## __Add the bot to your server__
2020-11-29 11:50:51 +01:00
- In the [Discord Dev Portal](https://discord.com/developers/applications) 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).
2021-06-03 09:08:50 +02:00
- You have the link to copy above between the two blocks `scopes` and `permissions`.
2021-05-30 13:54:34 +02:00
- If you need help, you can [join my Discord](https://discord.gg/Z5ePxH4).
2020-11-29 11:50:51 +01:00
## __Features__
2021-06-03 12:20:29 +02:00
- Everything is explained by doing the `help` command.
2021-06-08 00:02:35 +02:00
- Using SQLite for the database.
2021-06-03 09:08:50 +02:00
2021-06-03 09:10:58 +02:00
## __Launching locally__
2021-06-03 09:12:31 +02:00
If you want to run it without Docker, I personally use [direnv](https://direnv.net/) to store variables and have them only in the working folder.
2021-06-11 11:15:26 +02:00
Simply run `python3 main.py` in `src` folder to launch the bot in the repo folder.