diff --git a/bot/modules/accountability/TimeSlot.py b/bot/modules/accountability/TimeSlot.py index b87a0df3..ac12efea 100644 --- a/bot/modules/accountability/TimeSlot.py +++ b/bot/modules/accountability/TimeSlot.py @@ -409,12 +409,13 @@ class TimeSlot: if self.channel: try: await self.channel.delete() + self.channel = None except discord.HTTPException: pass if self.message: try: - timestamp = self.start_time.timestamp() + timestamp = int(self.start_time.timestamp()) embed = discord.Embed( title="Session - ".format( timestamp, timestamp + 3600 diff --git a/bot/modules/accountability/admin.py b/bot/modules/accountability/admin.py index cc1bd9d2..e294feef 100644 --- a/bot/modules/accountability/admin.py +++ b/bot/modules/accountability/admin.py @@ -1,3 +1,4 @@ +import asyncio import discord import settings @@ -37,12 +38,12 @@ class accountability_category(settings.Channel, settings.GuildSetting): return "The accountability system has been started in **{}**.".format(self.value.name) else: if self.id in AG.cache: - aguild = AG.cache[self.id] + aguild = AG.cache.pop(self.id) if aguild.current_slot: - aguild.current_lost.cancel() + asyncio.create_task(aguild.current_slot.cancel()) if aguild.upcoming_slot: - aguild.upcoming_slot.cancel() - return "The accountability system has been stopped." + asyncio.create_task(aguild.upcoming_slot.cancel()) + return "The accountability system has been shut down." else: return "The accountability category has been unset."