mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
* feat: all emoji rest methods * Fix code style issues with ESLint Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
10 lines
379 B
TypeScript
10 lines
379 B
TypeScript
import type { Attachment, Bot } from '../deps.js'
|
|
|
|
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')
|
|
}
|
|
})
|
|
}
|