feat(bot): ✨ Move background tasks to separate image.
This commit is contained in:
@@ -238,11 +238,6 @@ class Calls(base.Cog):
|
||||
f"**TIP**: {secrets.choice(constants.TIPS).replace("{prefix}", ctx.clean_prefix)}\n"
|
||||
f"☎️ {secrets.choice(constants.MSGS_PHONE_CALLING)}\n"
|
||||
)
|
||||
+ (
|
||||
"⚠️ The phone will be hung up soon due to a scheduled restart.\n"
|
||||
if self.bot.scheduled_shutdown.value
|
||||
else ""
|
||||
)
|
||||
+ msg_phone_answered
|
||||
)
|
||||
|
||||
@@ -254,11 +249,6 @@ class Calls(base.Cog):
|
||||
f"**TIP**: {secrets.choice(constants.TIPS).replace("{prefix}", ctx.clean_prefix)}\n"
|
||||
f"☎️ {secrets.choice(constants.MSGS_PHONE_CALLING)}\n"
|
||||
)
|
||||
+ (
|
||||
"⚠️ The phone will be hung up soon due to a scheduled restart.\n"
|
||||
if self.bot.scheduled_shutdown.value
|
||||
else ""
|
||||
)
|
||||
)
|
||||
|
||||
@commands.command(aliases=["s"])
|
||||
@@ -436,11 +426,6 @@ class Calls(base.Cog):
|
||||
f"**TIP**: {secrets.choice(constants.TIPS).replace("{prefix}", ctx.clean_prefix)}\n"
|
||||
f"☎️ You skipped the call.\n"
|
||||
)
|
||||
+ (
|
||||
"⚠️ The phone will be hung up soon due to a scheduled restart.\n"
|
||||
if self.bot.scheduled_shutdown.value
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
msg_phone_answered
|
||||
if msg_phone_answered
|
||||
@@ -460,11 +445,6 @@ class Calls(base.Cog):
|
||||
f"☎️ You skipped the call.\n"
|
||||
f"☎️ {secrets.choice(constants.MSGS_PHONE_CALLING)}\n"
|
||||
)
|
||||
+ (
|
||||
"⚠️ The phone will be hung up soon due to a scheduled restart.\n"
|
||||
if self.bot.scheduled_shutdown.value
|
||||
else ""
|
||||
)
|
||||
)
|
||||
|
||||
@commands.command(aliases=["hang", "h"], extras={"help_name": "Hang Up"})
|
||||
|
||||
@@ -242,8 +242,6 @@ class Mods(base.Cog):
|
||||
- `[<reason>]`: The reason of the shutdown.
|
||||
"""
|
||||
|
||||
self.bot.scheduled_shutdown.value = True
|
||||
|
||||
if seconds > 0:
|
||||
oncall_channel_ids = list(
|
||||
await self.bot.redis.smembers(constants.CHANNELS_ONCALL_SET)
|
||||
@@ -321,9 +319,7 @@ class Mods(base.Cog):
|
||||
|
||||
await flush_messages.flush()
|
||||
|
||||
await ctx.send("⚡ Messages were flushed, payphone will shut down.")
|
||||
|
||||
self.bot.shutdown.value = True
|
||||
await ctx.send("⚡ Messages were flushed, payphone is ready to shut down.")
|
||||
|
||||
@commands.command()
|
||||
@commands.is_owner()
|
||||
|
||||
@@ -35,6 +35,6 @@ TORTOISE_ORM = {
|
||||
},
|
||||
}
|
||||
|
||||
SUGGESTIONS_CHANNEL_ID = int(os.getenv("SUGGESTIONS_CHANNEL_ID"))
|
||||
SUGGESTIONS_CHANNEL_ID = int(os.getenv("SUGGESTIONS_CHANNEL_ID", "0"))
|
||||
|
||||
SERVER_INVITE = os.getenv("SERVER_INVITE")
|
||||
|
||||
Reference in New Issue
Block a user