This commit is contained in:
ITOH
2021-04-24 19:38:53 +02:00
parent 03db98cd48
commit 6eec266c60
14 changed files with 30 additions and 46 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
import { rest } from "../../rest/rest.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordMessage } from "../../types/messages/message.ts";
import { Message } from "../../types/messages/message.ts";
import { endpoints } from "../../util/constants.ts";
/** Crosspost a message in a News Channel to following channels. */
export async function publishMessage(channelId: string, messageId: string) {
const data = (await rest.runMethod(
const data = await rest.runMethod<Message>(
"post",
endpoints.CHANNEL_MESSAGE_CROSSPOST(channelId, messageId),
)) as DiscordMessage;
);
return structures.createDiscordenoMessage(data);
return await structures.createDiscordenoMessage(data);
}