-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (23 loc) · 806 Bytes
/
main.py
File metadata and controls
32 lines (23 loc) · 806 Bytes
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
from config import Secrets
import discord
import os
from pycolorise.colors import Purple, Blue
from discord.ext import commands
intents = discord.Intents.all()
client = commands.Bot(command_prefix="$", intents=intents)
print(Purple("Loading cogs:"))
for file in os.listdir("./cogs"):
if file.endswith(".py") and "__pycache__" not in file:
filename = file[:-3]
try:
client.load_extension("cogs.{}".format(filename))
print(Blue(f"\t- {filename} ✅"))
except:
print(Blue(f"\t- {filename} ❌"))
print()
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game("$help"))
print(Blue(f"{client.user} is online"))
if __name__ == "__main__":
client.run(Secrets.token)