diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml index bf7fc0c..612d9a1 100644 --- a/.idea/dataSources.local.xml +++ b/.idea/dataSources.local.xml @@ -1,6 +1,6 @@ - + " diff --git a/main.py b/main.py index 8f5d601..22f9258 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ import discord from discord.ext import commands import config -from utils import registry +from utils import registry, console bot = commands.Bot( @@ -10,26 +10,26 @@ bot = commands.Bot( allowed_mentions=discord.AllowedMentions.none(), intents=discord.Intents.default() + discord.Intents.members ) -bot.load_extension("jishaku") -bot.load_extension("cogs.verify") -bot.load_extension("cogs.mod") -bot.load_extension("cogs.events") -bot.load_extension("cogs.assignments") + +for ext in ["jishaku", "cogs.verify", "cogs.mod", "cogs.events", "cogs.assignments"]: + bot.load_extension(ext) + console.log(f"Loaded extension [green]{ext}") bot.loop.run_until_complete(registry.create_all()) @bot.listen() async def on_connect(): - print("Connected to discord!") + console.log("[green]Connected to discord!") @bot.event async def on_ready(): - print("Logged in as", bot.user) + console.log("Logged in as", bot.user) @bot.slash_command() async def ping(ctx: discord.ApplicationContext): + # noinspection SpellCheckingInspection """Checks the bot's response time""" gateway = round(ctx.bot.latency * 1000, 2) return await ctx.respond(f"\N{white heavy check mark} Pong! `{gateway}ms`.")