From c6f6c7ef4094655c450fe214a64dc9d9bca21766 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 19 Jun 2020 04:06:47 +0100 Subject: [PATCH] Tried to disable the reminder command. Gonna fix it later --- cogs/Reminder.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cogs/Reminder.py b/cogs/Reminder.py index 96a3d4e9..cbc509ba 100644 --- a/cogs/Reminder.py +++ b/cogs/Reminder.py @@ -1,3 +1,4 @@ +import _thread from datetime import datetime from datetime import timedelta from time import sleep @@ -9,18 +10,19 @@ class Reminder(commands.Cog): def __init__(self, bot): self.bot = bot - @commands.command() - async def remindme(self, ctx): + @commands.Cog.listener() + @commands.has_any_role('Hamothy') + async def ex(self, ctx): time_left = [float(i) for i in str(datetime.now().time()).split(":")] - time_left = timedelta(hours=2) - timedelta(hours=time_left[0] % 2, minutes=time_left[1], - seconds=time_left[2]) - + time_left = timedelta(hours=2) - timedelta(hours=time_left[0] % 2, minutes=time_left[1], seconds=time_left[2]) sleep(round(time_left.total_seconds())) while True: await ctx.send("Bump the Server Idiots") sleep(7200) + _thread.start_new_thread(ex, ()) + def setup(bot): bot.add_cog(Reminder(bot))