-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
28 lines (21 loc) · 836 Bytes
/
bot.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
import discord
from discord.ext import commands
from typing import Literal
import json
class Client(commands.Bot):
def __init__(self):
super().__init__(command_prefix=commands.when_mentioned, intents = discord.Intents.default())
self.synced = False
self.cogslist = ['cogs.inhouse', 'cogs.profile', 'cogs.leaderboard']
async def setup_hook(self):
for ext in self.cogslist:
await self.load_extension(ext)
async def on_ready(self):
print(f"Logged in as {self.user}.")
await self.tree.sync()
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name='Church Customs')) # Custom Presence.
with open("config.json", "r") as f:
data = json.load(f)
TOKEN = data['TOKEN']
client = Client()
client.run(TOKEN)