This discord bot was made for Algosup in 2020. It has a lot of features such translator, events manager, utils, and more. Made by student(s) for students.
- Python >= 3.8
- discord.py >= 2.0.0a
- SQL
- MariaDB (or MySQL)
Install python packages with:
- pip
$ pip install -r requirements.txt
-
Create a application on Discord Developpers
-
Enable the bot status in Discord Developpers/applications/{YOUR_APP_ID}/bot
-
Please make sure you have activated each
Privileged Gateway Intents
in Discord Developpers/applications/{YOUR_APP_ID}/bot #Privileged Gateway Intents for your application. -
Copy the token bot from Discord Developpers/applications/{YOUR_APP_ID}/bot #Token
{YOUR_APP_ID}
with your own app/bot ID.
-
Paste your dicord bot token in the
"token"
field insideauth/auth.json
. -
Configure the prefix in the
config\bot.json
. -
If you're using the database, you need to configure the
config\database.json
file.
fridaycake
, me
, croissants
& birthday
.
Github setup:
- On Github.com go on your project repository
- Then click on
Settings
>Actions
>Runners
>New self-hosted runner
. - Then select the right
runner-image
related to your machine and the rightarchitecture
. - Then follow the
Download
and theConfigure
instructions.
Server setup:
- If you want to start the self-runner on boot, you can follow this guide.
:warning: The self-hosted runner should have the following permissions,
install apps
andstart/restart services
. (install the service as --user usernameWithPermissions)
Discord bot service: This step is made for linux only.
- Create a service file in
/etc/systemd/system/your-service-name.service
with the following content:
[Unit]
Description=Discord bot startup service
After=multi-user.target
[Service]
Type=simple
Restart=no
User={usernameWithPermissions}
WorkingDirectory=/home/{username}/actions-runner/_work/Algosup-Discord/Algosup-Discord
ExecStart=python3 /home/{username}/actions-runner/_work/Algosup-Discord/Algosup-Discord/bot.py
[Install]
WantedBy=multi-user.target
{username}
& {usernameWithPermissions}
with your username and Algosup-Discord/Algosup-Discord
with your project name.
- Then enable the service with
systemctl enable your-service-name.service
table_birthday
CREATE TABLE IF NOT EXISTS `table_birthday`
(
`user_id` BIGINT unsigned NOT NULL,
`user_birth` DATE NOT NULL,
UNIQUE(`user_id`)
)
ENGINE = InnoDB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci;
table_croissants
CREATE TABLE IF NOT EXISTS `table_croissants`
(
`user_id` BIGINT unsigned NOT NULL,
`user_count` SMALLINT unsigned,
UNIQUE(`user_id`)
)
ENGINE = InnoDB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci;
table_fridaycake
CREATE TABLE IF NOT EXISTS `table_fridaycake`
(
`user_isin` BOOLEAN NOT NULL,
`user_id` BIGINT unsigned NOT NULL,
`user_name` varchar(32) NOT NULL,
UNIQUE(`user_id`)
)
ENGINE = InnoDB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci;
table_me
CREATE TABLE IF NOT EXISTS `table_me`
(
`user_id` BIGINT unsigned NOT NULL,
`user_me` varchar(1024),
UNIQUE(`user_id`)
)
ENGINE = InnoDB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci;
table_prefix
CREATE TABLE IF NOT EXISTS `table_prefix`
(
`guild_id` BIGINT unsigned NOT NULL,
`guild_prefix` varchar(256),
UNIQUE(`guild_id`)
)
ENGINE = InnoDB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci;
Show available commands
([smth,smthelse] are aliases)
- ADMIN:
?changeprefix {new_prefix}
["cp"]
?deletechannel {name}
["delc"]
?killloop {cog}
["kill"]
?reload {cog}
["rel"]
?reloadall
["rell", "relall"]
?reloadviews
["rmod", "rview", "rviews"]
- BASIC:
?help
["h", "?", "commands"]
?ping
[]
- BIRTHDAY:
?birthday
["bd", "setbirthday", "setbirth", "birth"]
?showbirthday
['showbirth', 'sbd']
- FRIDAYCAKE:
?fridaycake
["fc"]
?all
["a", "fa"]
?next
["n", "nc"]
?when
["w", "fw"]
- INFO:
?emojilist
["ce", "el"]
?lookup {user}
["lk"]
?profilepicture
["pp"]
?stat
['status','graph','gs','sg']
- ME:
?description
["me"]
?showdescription
["sme", "showme"]
- PRIVATETEXTUAL:
?createprivate
["create", "+"]
?deleteprivate
["delete", "-"]
?renameprivate
["rename", "_"]
?addprivate
["add", ">"]
- SPOTIFY:
?spotify {user}
["sp", "sy", "spy", "spot"]
- USEFULL:
?strawpoll
["stp", "straw", "sondage"]
Show images/icons
- Promotion Alpha 2020-2021 :
Aurélien
Brendon
Clément
Clémentine
Eloi
Eric
Florent
Ivan
Jules
Karine
Laura-Lee
Laurent
Louis
Martin
Max
Paul
Robin
Romain
Salahedine
Steevy
Théo
- Promotion Beta 2021-2022 :
Alexandre
Antonin
Arthur
David
Elise
Gaël
Guillaume
Léo
Mathieu
Maxime
Nicolas
Paul
Pierre
Quentin
Robin
Théo
Thomas
- Promotion Gamma 2022-2023 :
- Promotion Delta 2023-2024 :
- Promotion Epsilon 2024-2025 :
- Promotion Zeta 2025-2026 :
- Promotion Eta 2026-2027 :
- Promotion Theta 2027-2028 :
- Promotion Iota 2028-2029 :
- Promotion Kappa 2029-2030 :
- Promotion Lambda 2030-2031 :
- Promotion Mu 2031-2032 :
- Promotion Nu 2032-2033 :
- Promotion Xi 2033-2034 :
- Promotion Omicron 2034-2035 :
- Promotion Pi 2035-2036 :
- Promotion Rho 2036-2037 :
- Promotion Sigma 2037-2038 :
- Promotion Tau 2038-2039 :
- Promotion Upsilon 2039-2040 :
- Promotion Phi 2040-2041 :
- Promotion Chi 2041-2042 :
- Promotion Psi 2042-2043 :
- Promotion Omega 2043-2044 :