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)),
|
||||
);
|
||||
}
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@ import { CreateGlobalApplicationCommand } from "../types/interactions/create_glo
|
||||
import { Errors } from "../types/misc/errors.ts";
|
||||
import { DiscordImageFormat } from "../types/misc/image_format.ts";
|
||||
import { DiscordImageSize } from "../types/misc/image_size.ts";
|
||||
import { EditGlobalApplicationCommand } from "../types/mod.ts";
|
||||
import { SLASH_COMMANDS_NAME_REGEX } from "./constants.ts";
|
||||
|
||||
export async function urlToBase64(url: string) {
|
||||
@@ -167,7 +168,7 @@ function validateSlashOptions(options: ApplicationCommandOption[]) {
|
||||
}
|
||||
|
||||
export function validateSlashCommands(
|
||||
commands: CreateGlobalApplicationCommand[],
|
||||
commands: (CreateGlobalApplicationCommand | EditGlobalApplicationCommand)[],
|
||||
create = false,
|
||||
) {
|
||||
for (const command of commands) {
|
||||
|
||||
Reference in New Issue
Block a user