diff --git a/src/helpers/channels/editChannel.ts b/src/helpers/channels/editChannel.ts index 68b3fc494..063d8ae94 100644 --- a/src/helpers/channels/editChannel.ts +++ b/src/helpers/channels/editChannel.ts @@ -35,13 +35,17 @@ export async function editChannel(bot: Bot, channelId: bigint, options: ModifyCh name: options.name, topic: options.topic, bitrate: options.bitrate, - userLimit: options.userLimit, - rateLimitPerUser: options.rateLimitPerUser, + user_limit: options.userLimit, + rate_limit_per_user: options.rateLimitPerUser, position: options.position, - parentId: options.parentId, + parent_id: options.parentId === null ? null : options.parentId?.toString(), nsfw: options.nsfw, type: options.type, - permissionOverwrites: options.permissionOverwrites + archived: options.archived, + auto_archive_duration: options.autoArchiveDuration, + locked: options.locked, + invitable: options.invitable, + permission_overwrites: options.permissionOverwrites ? options.permissionOverwrites?.map((overwrite) => { return { ...overwrite, diff --git a/src/types/channels/modifyChannel.ts b/src/types/channels/modifyChannel.ts index ca922380d..72658ae4a 100644 --- a/src/types/channels/modifyChannel.ts +++ b/src/types/channels/modifyChannel.ts @@ -22,7 +22,7 @@ export interface ModifyChannel { /** Channel or category-specific permissions */ permissionOverwrites?: Overwrite[] | null; /** Id of the new parent category for a channel */ - parentId?: string | null; + parentId?: bigint | null; /** Voice region id for the voice channel, automatic when set to null */ rtcRegion?: string | null; /** The camera video quality mode of the voice channel */ diff --git a/tests/benchmark.ts b/tests/benchmark.ts index 5b9be3850..090122742 100644 --- a/tests/benchmark.ts +++ b/tests/benchmark.ts @@ -5,7 +5,10 @@ import { sanitizeMode } from "./constants.ts"; Deno.test({ name: "[Memory] Benchmark memory tests", fn: async (t) => { - await memoryBenchmarks(bot, true); + await memoryBenchmarks(bot, { + log: true, + table: true, + }); }, ...sanitizeMode, }); diff --git a/tests/channels/threads.ts b/tests/channels/threads.ts index cee559cdb..7faffad8f 100644 --- a/tests/channels/threads.ts +++ b/tests/channels/threads.ts @@ -35,6 +35,7 @@ Deno.test("[thread] Start a thread", async (t) => { await t.step("[thread] Edit and archive a thread", async () => { const edited = await bot.helpers.editChannel(thread.id, { + // @ts-ignore archived: true, name: "new name", autoArchiveDuration: 1440,