|
|
@ -1,18 +1,13 @@
|
|
|
|
import _thread
|
|
|
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
from datetime import timedelta
|
|
|
|
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from discord.ext import commands
|
|
|
|
from discord.ext import commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Reminder(commands.Cog):
|
|
|
|
class Reminder(commands.Cog):
|
|
|
|
def __init__(self, bot):
|
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
"""
|
|
|
|
@commands.Cog.listener()
|
|
|
|
@commands.Cog.listener()
|
|
|
|
@commands.has_any_role('Hamothy')
|
|
|
|
@commands.has_any_role('Hamothy')
|
|
|
|
async def ex(self, ctx):
|
|
|
|
async def ():
|
|
|
|
time_left = [float(i) for i in str(datetime.now().time()).split(":")]
|
|
|
|
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()))
|
|
|
|
sleep(round(time_left.total_seconds()))
|
|
|
@ -21,8 +16,8 @@ class Reminder(commands.Cog):
|
|
|
|
await ctx.send("Bump the Server Idiots")
|
|
|
|
await ctx.send("Bump the Server Idiots")
|
|
|
|
sleep(7200)
|
|
|
|
sleep(7200)
|
|
|
|
|
|
|
|
|
|
|
|
_thread.start_new_thread(ex, ())
|
|
|
|
_thread.start_new_thread(ex(self=self, ctx), ())
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
def setup(bot):
|
|
|
|
bot.add_cog(Reminder(bot))
|
|
|
|
bot.add_cog(Reminder(bot))
|
|
|
|