This commit is contained in:
2024-08-10 18:52:58 +02:00
parent 1400092b86
commit 23297ae200

View File

@@ -123,7 +123,7 @@ async def create_discord_event(event: CreateDiscordEvent):
async with AsyncClient() as client: async with AsyncClient() as client:
response = await client.post( response = await client.post(
f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events", f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events",
data=event.model_dump(), json=event.model_dump(),
headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"} headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"}
) )
@@ -149,7 +149,7 @@ async def edit_discord_event(event_id: str, event: UpdateDiscordEvent):
async with AsyncClient() as client: async with AsyncClient() as client:
response = await client.patch( response = await client.patch(
f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events/{event_id}", f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events/{event_id}",
data=event.model_dump(), json=event.model_dump(),
headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"} headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"}
) )