mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
change(startThread): make messageId a seperate argument
This commit is contained in:
@@ -9,7 +9,7 @@ import { channelToThread } from "../../../util/transformers/channel_to_thread.ts
|
||||
import { snakelize } from "../../../util/utils.ts";
|
||||
|
||||
/** Creates a new public thread from an existing message. Returns a thread channel. */
|
||||
export async function startThread(channelId: bigint, options: StartThread & { messageId: bigint }) {
|
||||
export async function startThread(channelId: bigint, messageId: bigint, options: StartThread) {
|
||||
const channel = await cacheHandlers.get("channels", channelId);
|
||||
if (channel) {
|
||||
if (!channel.isGuildTextBasedChannel) {
|
||||
@@ -20,10 +20,6 @@ export async function startThread(channelId: bigint, options: StartThread & { me
|
||||
}
|
||||
|
||||
return channelToThread(
|
||||
await rest.runMethod<Channel>(
|
||||
"post",
|
||||
endpoints.THREAD_START_PUBLIC(channelId, options.messageId),
|
||||
snakelize(options)
|
||||
)
|
||||
await rest.runMethod<Channel>("post", endpoints.THREAD_START_PUBLIC(channelId, messageId), snakelize(options))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export * from "./channel_to_thread.ts";
|
||||
export * from "./thread_member_modified.ts";
|
||||
export * from "./thread_members_update_modified.ts"
|
||||
export * from "./thread_members_update_modified.ts";
|
||||
|
||||
Reference in New Issue
Block a user