def timer_stop(self, ctx: commands.Context):
""" Stops the timer, if it's running.
Resets the current period and time, but keeps the setup.
"""
channel = self.bot.spoof(ctx.message.author, lib.get_channel(ctx))
interface = self.bot.get_interface(channel)
if interface.timer.stop():
send = "Timer will stop soon."
await self.bot.say(send, delete_after=interface.timer.step)
else:
await self.bot.remove_messages(channel)
send = "Timer has stopped."
await self.bot.say(send, tts=interface.tts)
lib.log(send, channel_id=channel.id)
评论列表
文章目录