feat(bot): ✨ Shut down directly on p.shutdown 0.

This commit is contained in:
Nyeki.py
2024-10-24 01:52:31 -03:00
parent f5ff348468
commit eb6c7fcd9c
+5 -2
View File
@@ -245,6 +245,7 @@ class Mods(base.Cog):
self.bot.scheduled_shutdown.value = True
if seconds > 0:
oncall_channel_ids = list(
await self.bot.redis.smembers(constants.CHANNELS_ONCALL_SET)
)
@@ -256,7 +257,9 @@ class Mods(base.Cog):
int(c) for c in searching_channel_ids
]
await ctx.send(f"⚡ Notifying `{len(channel_ids)}` channels of the shutdown.")
await ctx.send(
f"⚡ Notifying `{len(channel_ids)}` channels of the shutdown."
)
for channel_id in channel_ids:
try:
@@ -302,7 +305,7 @@ class Mods(base.Cog):
await self.bot.change_presence(
activity=discord.CustomActivity(name="Payphone is restarting."),
status=discord.Status.do_not_disturb
status=discord.Status.do_not_disturb,
)
await self.bot.redis.delete(constants.CHANNELS_ONCALL_SET)