mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
only publish set guild's events to website
This commit is contained in:
1 parent
0e695e81df
commit
89b0a793e4
1 file changed
+6
@@ -68,6 +68,9 @@ class WebsiteEvents(commands.Cog):
|
||||
event (discord.ScheduledEvent): The created event
|
||||
"""
|
||||
|
||||
if event.guild_id != self.bot.guild_id:
|
||||
return
|
||||
|
||||
# Convert timezone to Europe/Oslo
|
||||
# We need to set a timezone unit before being able to convert it to another timezone
|
||||
# That's why this line is so fucking weird
|
||||
@@ -107,6 +110,9 @@ class WebsiteEvents(commands.Cog):
|
||||
event (discord.ScheduledEvent): The deleted event
|
||||
"""
|
||||
|
||||
if event.guild_id != self.bot.guild_id:
|
||||
return
|
||||
|
||||
mutation = {"mutations": [{"delete": {"id": str(event.id)}}]}
|
||||
|
||||
response = requests.post(self.api_url, headers=self.auth_header, data=json.dumps(mutation))
|
||||
|
||||
Reference in new issue
Block a user