mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-15 19:08:17 +00:00
12 lines
595 B
TypeScript
12 lines
595 B
TypeScript
import type { Channel } from "../../../types/channels/channel.ts";
|
|
import type { StartThreadWithoutMessage } from "../../../types/channels/threads/startThread.ts";
|
|
import type { Bot } from "../../../bot.ts";
|
|
|
|
/** Creates a new private thread. Returns a thread channel. */
|
|
export async function startThreadWithoutMessage(bot: Bot, channelId: bigint, options: StartThreadWithoutMessage) {
|
|
return await bot.rest.runMethod<Channel>(bot.rest, "post", bot.constants.endpoints.THREAD_START_PRIVATE(channelId), {
|
|
name: options.name,
|
|
auto_archive_duration: options.autoArchiveDuration,
|
|
});
|
|
}
|