-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskySB.py
56 lines (47 loc) · 1.8 KB
/
skySB.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
48
49
50
51
52
53
54
55
56
# ______ __ __ __ __ ______ ______
# /\ ___\ /\ \/ / /\ \_\ \ /\ ___\ /\ == \
# \ \___ \ \ \ _--. \ \____ \ \ \___ \ \ \ __<
# \/\_____\ \ \_\ \_\ \/\_____\ \/\_____\ \ \_____\
# \/_____/ \/_/\/_/ \/_____/ \/_____/ \/_____/
#
# AGPL-3.0 license
import os
import discord
from utils import config, motd, bot, logger
from colored import Fore, Style
print(motd)
logger.warning(f"status: {Fore.YELLOW}loading...{Style.RESET}")
@bot.event
async def on_ready():
os.system("clear")
print(motd)
logger.warning(f"status: {Fore.GREEN}success{Style.RESET}")
logger.warning(f"connected: {Style.BOLD}{bot.user}{Style.RESET}")
logger.warning(f'prefix: {Style.BOLD}{config.get("prefix")}{Style.RESET}')
print("-" * 45)
# system cogs
for file in os.listdir(f"{os.path.realpath(os.path.dirname(__file__))}/cogs"):
if file.startswith("_"):
pass
if file.endswith(".py"):
extension = file[:-3]
try:
await bot.load_extension(f"cogs.{extension}")
except Exception as e:
exception = f"{type(e).__name__}: {e}"
logger.error(f"{extension}: {exception}")
# custom cogs
for file in os.listdir(
f"{os.path.realpath(os.path.dirname(__file__))}/cogs/custom"
):
if file.startswith("_"):
pass
if file.endswith(".py"):
extension = file[:-3]
try:
await bot.load_extension(f"cogs.custom.{extension}")
except Exception as e:
exception = f"{type(e).__name__}: {e}"
logger.error(f"{extension}: {exception}")
while True:
bot.run(config.get("token"), log_handler=None)