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