mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Moar
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { ModifyGuildIntegration } from "../../types/mod.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||
|
||||
@@ -6,7 +7,7 @@ import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||
export async function editIntegration(
|
||||
guildId: string,
|
||||
id: string,
|
||||
options: EditIntegrationOptions,
|
||||
options: ModifyGuildIntegration,
|
||||
) {
|
||||
await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function getMessages(
|
||||
| GetMessagesAfter
|
||||
| GetMessagesBefore
|
||||
| GetMessagesAround
|
||||
| GetMessages
|
||||
| GetMessages,
|
||||
) {
|
||||
await requireBotChannelPermissions(channelId, [
|
||||
"VIEW_CHANNEL",
|
||||
@@ -23,10 +23,10 @@ export async function getMessages(
|
||||
const result = (await rest.runMethod(
|
||||
"get",
|
||||
endpoints.CHANNEL_MESSAGES(channelId),
|
||||
options
|
||||
options,
|
||||
)) as DiscordMessage[];
|
||||
|
||||
return Promise.all(
|
||||
result.map((res) => structures.createDiscordenoMessage(res))
|
||||
result.map((res) => structures.createDiscordenoMessage(res)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user