2022-03-07 00:16:13 +00:00
|
|
|
import discord
|
|
|
|
from discord.ext import commands
|
2022-03-08 02:37:07 +00:00
|
|
|
import logging
|
|
|
|
from configmanager import ConfigManager
|
2022-03-07 00:16:13 +00:00
|
|
|
|
|
|
|
intents = discord.Intents.default()
|
|
|
|
intents.members = True
|
|
|
|
|
|
|
|
bot = discord.Bot(intents=intents)
|
2022-03-08 02:37:07 +00:00
|
|
|
setting = ConfigManager.read_config()
|
|
|
|
token = setting['Bot']['Token']
|
|
|
|
logger = logging.getLogger()
|
2022-03-07 00:16:13 +00:00
|
|
|
|
|
|
|
class Kiafumi(discord.Bot):
|
|
|
|
@bot.event
|
|
|
|
async def on_ready():
|
2022-03-08 02:37:07 +00:00
|
|
|
logger.info(f'Logged on as {bot.user}!')
|
2022-03-07 00:16:13 +00:00
|
|
|
|
2022-03-07 04:19:24 +00:00
|
|
|
for ext in ['commands.fun', 'commands.moderation']:
|
|
|
|
bot.load_extension(ext)
|
2022-03-07 00:16:13 +00:00
|
|
|
|
2022-03-08 02:37:07 +00:00
|
|
|
bot.run(token) # token
|