-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (28 loc) · 936 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
33
import os
import asyncio
import discord
from discord.ext import interaction
from config.config import get_config
from config.log_config import log
if __name__ == "__main__":
directory = os.path.dirname(os.path.abspath(__file__))
parser = get_config()
log.info("HKDev Korea 인증시스템을 불러오는 중입니다.")
intent = discord.Intents.default()
intent.members = True
intent.message_content = True
bot = interaction.Client(
command_prefix="!",
# intents=discord.Intents.all(),
intents=intent,
enable_debug_events=True,
global_sync_command=True
)
# cogs = ["cogs." + file[:-3] for file in os.listdir(os.path.join(directory, 'cogs')) if file.endswith(".py")]
# for cog in cogs:
# bot.load_extension(cog)
asyncio.run(
bot.load_extensions("cogs", directory)
)
token = parser.get('DEFAULT', 'token')
bot.run(token)