-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
32 lines (24 loc) · 770 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
31
32
# Written By Leho | leho.dev | github.com/lehoooo
import discord
from discord.ext import commands
from discord.ext import tasks
import sys
from datetime import datetime
import json
bot = commands.Bot(command_prefix='>')
try:
with open("config.json", "r") as configfile:
config = json.load(configfile)
except Exception as e:
print("Error Loading Config " + str(e))
sys.exit(9)
TOKEN = str(config['token'])
print("Starting")
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name="🐲"))
print("Logged in as: " + bot.user.name + "#" + bot.user.discriminator)
print("Ready")
bot.load_extension("cogs.moderation")
bot.load_extension("cogs.music")
bot.run(TOKEN)