mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
1 file changed
-12
@@ -5,7 +5,6 @@ from zoneinfo import ZoneInfo
|
||||
import discord
|
||||
import requests
|
||||
from discord.ext import commands
|
||||
from discord.ext import tasks
|
||||
|
||||
|
||||
class WebsiteEvents(commands.Cog):
|
||||
@@ -28,8 +27,6 @@ class WebsiteEvents(commands.Cog):
|
||||
+ f"/v2021-03-25/data/mutate/{self.bot.sanity['dataset']}"
|
||||
)
|
||||
|
||||
self.sync_events_loop.start()
|
||||
|
||||
async def cog_load(self):
|
||||
asyncio.create_task(self.after_ready())
|
||||
|
||||
@@ -60,15 +57,6 @@ class WebsiteEvents(commands.Cog):
|
||||
|
||||
self.bot.logger.info("Finished syncing events! Note errors may have occured")
|
||||
|
||||
@tasks.loop(hours=12, reconnect=True)
|
||||
async def sync_events_loop(self):
|
||||
"""
|
||||
Sync events from Discord to Sanity CMS every 12 hours.
|
||||
This is a temporary meassure to make sure events are deleted when cancelled
|
||||
"""
|
||||
|
||||
await self.sync_events()
|
||||
|
||||
@commands.Cog.listener("on_scheduled_event_create")
|
||||
async def create_event(self, event: discord.ScheduledEvent):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user