Skip to content

Commit

Permalink
πŸ” Replace ctx.client with ctx.box
Browse files Browse the repository at this point in the history
  • Loading branch information
tookender committed Aug 25, 2024
1 parent 39daa6c commit 47a027a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/config/levelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ async def view_message(self, interaction: Interaction, button: discord.ui.Button
async def update_message(ctx, edit: Optional[bool] = True):
try:
if ctx.guild:
data = await ctx.client.pool.fetchrow(
data = await ctx.bot.pool.fetchrow(
"SELECT levelling_enabled, levelling_announce, levelling_channel, levelling_message, levelling_multiplier FROM guilds WHERE guild_id = $1",
ctx.guild.id,
)

if not data:
await ctx.client.pool.execute("INSERT INTO guilds(guild_id) VALUES ($1)", ctx.guild.id)
await ctx.bot.pool.execute("INSERT INTO guilds(guild_id) VALUES ($1)", ctx.guild.id)
await update_message(ctx, edit)

bool_emojis = {
Expand Down

0 comments on commit 47a027a

Please sign in to comment.