mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-15 19:08:17 +00:00
fix: stabilize tests
This commit is contained in:
@@ -20,7 +20,7 @@ export function transformScheduledEvent(
|
|||||||
scheduledStartTime: Date.parse(payload.scheduled_start_time),
|
scheduledStartTime: Date.parse(payload.scheduled_start_time),
|
||||||
scheduledEndTime: payload.scheduled_end_time ? Date.parse(payload.scheduled_end_time) : undefined,
|
scheduledEndTime: payload.scheduled_end_time ? Date.parse(payload.scheduled_end_time) : undefined,
|
||||||
entityId: payload.entity_id ? bot.transformers.snowflake(payload.entity_id) : undefined,
|
entityId: payload.entity_id ? bot.transformers.snowflake(payload.entity_id) : undefined,
|
||||||
creator: bot.transformers.user(bot, payload.creator!),
|
creator: payload.creator ? bot.transformers.user(bot, payload.creator) : undefined,
|
||||||
|
|
||||||
name: payload.name,
|
name: payload.name,
|
||||||
description: payload.description,
|
description: payload.description,
|
||||||
@@ -40,7 +40,7 @@ export interface DiscordenoScheduledEvent {
|
|||||||
/** the channel id in which the scheduled event will be hosted if specified */
|
/** the channel id in which the scheduled event will be hosted if specified */
|
||||||
channelId?: bigint;
|
channelId?: bigint;
|
||||||
/** the id of the user that created the scheduled event */
|
/** the id of the user that created the scheduled event */
|
||||||
creatorId?: bigint;
|
creatorId: bigint;
|
||||||
/** the name of the scheduled event */
|
/** the name of the scheduled event */
|
||||||
name: string;
|
name: string;
|
||||||
/** the description of the scheduled event */
|
/** the description of the scheduled event */
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export const CACHED_COMMUNITY_GUILD_ID = 907350958810480671n;
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
import { Bot } from "../../../../src/bot.ts";
|
import { Bot } from "../../../../src/bot.ts";
|
||||||
import { ChannelTypes } from "../../../../src/types/channels/channelTypes.ts";
|
import { ChannelTypes } from "../../../../src/types/channels/channelTypes.ts";
|
||||||
import { CreateScheduledEvent, ScheduledEventEntityType } from "../../../../src/types/guilds/scheduledEvents.ts";
|
import { CreateScheduledEvent, ScheduledEventEntityType } from "../../../../src/types/guilds/scheduledEvents.ts";
|
||||||
|
import { CACHED_COMMUNITY_GUILD_ID } from "../../../constants.ts";
|
||||||
import { assertEquals, assertExists } from "../../../deps.ts";
|
import { assertEquals, assertExists } from "../../../deps.ts";
|
||||||
import { CACHED_COMMUNITY_GUILD_ID } from "../../../mod.ts";
|
|
||||||
|
|
||||||
export async function createScheduledEventTests(
|
export async function createScheduledEventTests(
|
||||||
bot: Bot,
|
bot: Bot,
|
||||||
|
|||||||
+889
-956
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user