mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
Merge branch 'main' of https://github.com/discordeno/discordeno into main
This commit is contained in:
@@ -2,6 +2,7 @@ import { botId } from "../../bot.ts";
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { Message, structures } from "../../structures/mod.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { DiscordMessage } from "../../types/mod.ts";
|
||||
import { PermissionStrings } from "../../types/permissions/permission_strings.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { requireBotChannelPermissions } from "../../util/permissions.ts";
|
||||
@@ -27,11 +28,11 @@ export async function editMessage(
|
||||
throw new Error(Errors.MESSAGE_MAX_LENGTH);
|
||||
}
|
||||
|
||||
const result = await rest.runMethod(
|
||||
const result: DiscordMessage = await rest.runMethod(
|
||||
"patch",
|
||||
endpoints.CHANNEL_MESSAGE(message.channelId, message.id),
|
||||
content,
|
||||
);
|
||||
|
||||
return structures.createDiscordenoMessage(result as DiscordMessage);
|
||||
return structures.createDiscordenoMessage(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user