-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathodyssee.py
executable file
·47 lines (35 loc) · 1.13 KB
/
odyssee.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# --------------------------------------------------
# Odyssée (version 5.4.3)
# by Sha-chan~
# last modification on April 30, 2023
#
# code provided with licence:
# GNU General Public Licence v3.0
# --------------------------------------------------
import asyncio
import json
import os
import discord
from discord.ext import commands
from libs.commands import AdminCommands, OdysseeCommands, load_save
if not "saves" in os.listdir():
os.mkdir("saves")
with open("config.json", "r") as file:
config = json.load(file)
intents = discord.Intents.default()
odyssee = commands.Bot(
command_prefix=commands.when_mentioned_or(config["PREFIX"]),
strip_after_prefix=True,
intents=discord.Intents.all(),
)
save = load_save()
async def setup():
for cmnd_module in (OdysseeCommands, AdminCommands):
await odyssee.add_cog(cmnd_module(config, save, odyssee))
@odyssee.event
async def on_ready():
activity = discord.Activity(type=discord.ActivityType.watching, name=config["PREFIX"] + "aide")
await odyssee.change_presence(activity=activity)
print("Connecté")
asyncio.run(setup())
odyssee.run(config["TOKEN"])