Skip to content

Commit

Permalink
fix: use self instead of bot in methods
Browse files Browse the repository at this point in the history
  • Loading branch information
n0Oo0Oo0b committed Jul 10, 2024
1 parent 6dbc76f commit 5469a86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def setup_hook(self):

for cog in INITIAL_COGS:
try:
await bot.load_extension(f"cogs.{cog}")
await self.load_extension(f"cogs.{cog}")
logger.debug(f'Imported cog "{cog}".')
except commands.errors.NoEntryPointError as e:
# ! Remove before push
Expand All @@ -63,14 +63,14 @@ async def setup_hook(self):
logger.info("Loaded all cogs.")

async def on_ready(self):
await bot.change_presence(
await self.change_presence(
activity=discord.Game(name=f"{config.prefix}help"),
status=discord.Status.do_not_disturb,
)

bot_name = bot.user.name
bot_description = bot.description
guild_number = len(bot.guilds)
bot_name = self.user.name
bot_description = self.description
guild_number = len(self.guilds)

logger.info(f'Bot "{bot_name}" is now connected.')
logger.info(f"Currently serving {guild_number} guilds.")
Expand Down

0 comments on commit 5469a86

Please sign in to comment.