mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
feat: add scheduled events unit tests
This commit is contained in:
@@ -85,7 +85,8 @@ export function transformGuild(
|
||||
),
|
||||
|
||||
id: guildId,
|
||||
ownerId: bot.transformers.snowflake(payload.guild.owner_id),
|
||||
// WEIRD EDGE CASE WITH BOT CREATED SERVERS
|
||||
ownerId: payload.guild.owner_id ? bot.transformers.snowflake(payload.guild.owner_id) : 0n,
|
||||
permissions: payload.guild.permissions ? bot.transformers.snowflake(payload.guild.permissions) : 0n,
|
||||
afkChannelId: payload.guild.afk_channel_id ? bot.transformers.snowflake(payload.guild.afk_channel_id) : undefined,
|
||||
widgetChannelId: payload.guild.widget_channel_id
|
||||
|
||||
@@ -20,7 +20,6 @@ export function transformScheduledEvent(
|
||||
scheduledStartTime: Date.parse(payload.scheduled_start_time),
|
||||
scheduledEndTime: payload.scheduled_end_time ? Date.parse(payload.scheduled_end_time) : undefined,
|
||||
entityId: payload.entity_id ? bot.transformers.snowflake(payload.entity_id) : undefined,
|
||||
speakerIds: payload.entity_metadata?.speaker_ids?.map((id) => bot.transformers.snowflake(id)),
|
||||
creator: payload.creator ? bot.transformers.user(bot, payload.creator) : undefined,
|
||||
|
||||
name: payload.name,
|
||||
@@ -58,8 +57,6 @@ export interface DiscordenoScheduledEvent {
|
||||
entityType: ScheduledEventEntityType;
|
||||
/** any additional id of the hosting entity associated with event */
|
||||
entityId?: bigint;
|
||||
/** the speakers of the stage channel */
|
||||
speakerIds?: bigint[];
|
||||
/** location of the event */
|
||||
location?: string;
|
||||
/** the user that created the scheduled event */
|
||||
|
||||
Reference in New Issue
Block a user