change: prettier code

This commit is contained in:
TriForMine
2021-10-21 19:42:37 +00:00
committed by GitHub Action
parent 4a12b7714b
commit 2266e9dd00
10 changed files with 57 additions and 42 deletions
+10 -5
View File
@@ -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,
}
)
);
}