mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
change: prettier code
This commit is contained in:
committed by
GitHub Action
parent
4a12b7714b
commit
2266e9dd00
@@ -1,7 +1,7 @@
|
||||
import type { Channel } from "../../../types/channels/channel.ts";
|
||||
import type { StartThread } from "../../../types/channels/threads/start_thread.ts";
|
||||
import type { Bot } from "../../../bot.ts";
|
||||
import {channelToThread} from "../../../util/transformers/channel_to_thread.ts";
|
||||
import { channelToThread } from "../../../util/transformers/channel_to_thread.ts";
|
||||
|
||||
/** Creates a new public thread from an existing message. Returns a thread channel. */
|
||||
export async function startThread(bot: Bot, channelId: bigint, messageId: bigint, options: StartThread) {
|
||||
@@ -15,9 +15,14 @@ export async function startThread(bot: Bot, channelId: bigint, messageId: bigint
|
||||
}
|
||||
|
||||
return channelToThread(
|
||||
await bot.rest.runMethod<Channel>(bot.rest,"post", bot.constants.endpoints.THREAD_START_PUBLIC(channelId, messageId), {
|
||||
name: options.name,
|
||||
auto_archive_duration: options.autoArchiveDuration
|
||||
})
|
||||
await bot.rest.runMethod<Channel>(
|
||||
bot.rest,
|
||||
"post",
|
||||
bot.constants.endpoints.THREAD_START_PUBLIC(channelId, messageId),
|
||||
{
|
||||
name: options.name,
|
||||
auto_archive_duration: options.autoArchiveDuration,
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user