mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-29 23:10:07 +00:00
* Plugins/Permissions: FIX PARITY ISSUES What is parity issues? Parity issues are files that exist but structured one way in the base/vanilla discordeno library, and structured another way in the permisison plugin. * deno fmt * plugins/permissions: nuke validations * plugins/permissions VALIDATIONS -> plugins/validations * plugins/validations: slash commands max 4000 chars * fix module not found
10 lines
376 B
TypeScript
10 lines
376 B
TypeScript
import { Attachment, Bot } from "../deps.ts";
|
|
|
|
export function validateAttachments(bot: Bot, attachments: Attachment[]) {
|
|
attachments.forEach((attachment) => {
|
|
if (attachment.description && !bot.utils.validateLength(attachment.description, { min: 0, max: 1024 })) {
|
|
throw new Error("Attachment description length must be less than 1024 characters");
|
|
}
|
|
});
|
|
}
|