def admin_shutdown(self, ctx: commands.Context):
""" Exits the program. Administrator only!
"""
lib.log("Shutting down...")
await self.bot.say("Hope I did well, bye!")
for channel, timer in self.bot.valid_timers().items():
if timer.get_state() != State.STOPPED:
timer.stop()
if lib.get_channel(ctx) != channel:
await self.bot.safe_send(
channel,
"I'm sorry, I have to go. See you later!"
)
await self.bot.remove_messages(channel)
self.bot.unsub_all()
await self.bot.logout()
评论列表
文章目录