-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
30 lines (21 loc) · 963 Bytes
/
main.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
import json
import discord
from discord.ext import commands
# Create a client with the Cog commands from the files
class Client(commands.Bot):
def __init__(self):
super().__init__(command_prefix="!", intents=discord.Intents.all())
self.commandsList = ["commands.pitpanda_signatures", "commands.prestige_calculations", "commands.basic", "commands.stats", "commands.map_quests", "commands.leaderboards", "commands.session_tracking", "commands.upgrades", "commands.discord_features"]
async def setup_hook(self):
for ext in self.commandsList:
await self.load_extension(ext)
print(f"Synced {ext.title()}")
async def on_ready(self):
print(f"Logged in as {self.user}")
synced = await self.tree.sync()
# Grab bot key and start a session
with open("../PitStats/tokens_and_keys/TOKEN.json", 'r') as f:
data = json.load(f)
TOKEN = data['TOKEN']
client = Client()
client.run(TOKEN)