From 708509ce038fc6a3e6977e60088b483bbd122abd Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Thu, 2 Sep 2021 21:48:13 +0200 Subject: [PATCH] Smol fixes for deployment --- Timer.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Timer.py b/Timer.py index 76bbca0..09827fd 100644 --- a/Timer.py +++ b/Timer.py @@ -102,15 +102,18 @@ class Timer(commands.Cog): except Exception as e: await ctx.channel.send(f"You idiot. Send the command right: {e}") - @commands.command(pass_context=True, hidden=False) + @commands.command(pass_context=True, hidden=True) async def reminders(self, ctx): - msg = "Here are my current reminders:\n" - for timer in self.timers: - msg += f"\t{timer.id}:\t{timer.status()}\n" - msg += "Use `!delete ` to delete a standing reminder" - await ctx.channel.send(msg) + if len(self.timers) > 0: + msg = "Here's what I'm gonna do:\n" + for timer in self.timers: + msg += f"\t{timer.id}:\t{timer.status()}\n" + msg += "*Use `!delete ` to delete a standing reminder*" + await ctx.channel.send(msg) + else: + await ctx.channel.send("Idiot. You have to set reminders first.") - @commands.command(pass_context=True, hidden=False) + @commands.command(pass_context=True, hidden=True) async def delete(self, ctx, id: int): self.timers.remove(id) self.pickle_timers.remove(id)