fix: Add client to testing webhook

This commit is contained in:
2026-07-30 11:59:50 +03:00
parent 5873b0fe65
commit a681da058f
2 changed files with 29 additions and 16 deletions
+8 -7
View File
@@ -123,7 +123,9 @@ class CampaignCog(LionCog):
return
# Open campaign UI
widget = CampaignDashboard(bot=self.bot, campaign=campaign, callerid=ctx.author.id)
widget = CampaignDashboard(
bot=self.bot, campaign=campaign, callerid=ctx.author.id
)
await widget.run(ctx.interaction)
await widget.wait()
@@ -179,7 +181,7 @@ class CampaignCog(LionCog):
# If logging webhook is given, check that it works
if logging_webhook is not None:
webhook = ThreadedWebhook.from_url(logging_webhook)
webhook = ThreadedWebhook.from_url(logging_webhook, client=self.bot)
try:
await webhook.test_webhook()
except (discord.HTTPException, discord.Forbidden):
@@ -202,7 +204,9 @@ class CampaignCog(LionCog):
f"Setup and started your reward campaign {campaign.row.campaign_name}! Good luck"
)
# Open campaign UI
widget = CampaignDashboard(bot=self.bot, campaign=campaign, callerid=ctx.author.id)
widget = CampaignDashboard(
bot=self.bot, campaign=campaign, callerid=ctx.author.id
)
await widget.run(ctx.interaction)
await widget.wait()
@@ -278,10 +282,7 @@ class CampaignCog(LionCog):
)
# Ack creation
await ctx.reply(
"Updated your campaign, good luck!",
ephemeral=True
)
await ctx.reply("Updated your campaign, good luck!", ephemeral=True)
campaign_configure_cmd.autocomplete("campaign_name")(_campaign_acmpl)