fix(bot): 🐛 Fix hangup_calls().

This commit is contained in:
Nyeki.py
2024-10-18 12:56:46 -03:00
parent 3120a0fa0d
commit e0851280df
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ class Calls(base.Cog):
def __init__(self, bot_instance: bot.Payphone):
self.bot = bot_instance
self.hangup_calls.add_exception_type(Exception)
self.hangup_calls.add_exception_type(exceptions.ConfigurationError)
self.hangup_calls.start()
def cog_unload(self) -> None:
@@ -73,10 +73,10 @@ class Calls(base.Cog):
pass
if len(hung_up_channel_ids) > 0:
await models.Channel.filter(id__in=hung_up_channel_ids).update(call=None)
await self.bot.redis.srem(
constants.CHANNELS_ONCALL_SET, *hung_up_channel_ids
)
await models.Channel.filter(id__in=hung_up_channel_ids).update(call=None)
@commands.command(aliases=["c"])
@commands.guild_only()
+1 -1
View File
@@ -189,7 +189,7 @@ class Mods(base.Cog):
total = await models.Report.filter(status=models.ReportStatus.ON_REVIEW).count()
if report is None:
await ctx.send("✅ You're up to date! No reports left to check.")
await ctx.send("No reports left, treat yourself with this cookie 🍪 !!")
return
await ctx.send(
+2 -2
View File
@@ -191,7 +191,7 @@ class ReportView(discord.ui.View):
if report is None:
await interaction.response.edit_message(
content="✅ You're up to date! No reports left to check.",
content="No reports left, treat yourself with this cookie 🍪 !!",
embed=None,
view=None,
)
@@ -224,7 +224,7 @@ class ReportView(discord.ui.View):
if report is None:
await interaction.response.edit_message(
content="✅ You're up to date! No reports left to check.",
content="No reports left, treat yourself with this cookie 🍪 !!",
embed=None,
view=None,
)