[helper] Fix entity metadata (#2595)

* change to null if no location

* style: deno fmt
This commit is contained in:
Jonathan Ho
2022-11-30 00:12:23 +08:00
committed by GitHub
parent 0910965de5
commit 50c6c6fbfb

View File

@@ -53,7 +53,7 @@ export async function editScheduledEvent(
bot.constants.routes.GUILD_SCHEDULED_EVENT(guildId, eventId),
{
channel_id: options.channelId === null ? null : options.channelId?.toString(),
entity_metadata: options.location ? { location: options.location } : undefined,
entity_metadata: options.location ? { location: options.location } : null,
name: options.name,
description: options.description,
scheduled_start_time: options.scheduledStartTime ? new Date(options.scheduledStartTime).toISOString() : undefined,