diff --git a/backend/src/plugins/ModActions/commands/NoteCmd.ts b/backend/src/plugins/ModActions/commands/NoteCmd.ts index 5e203328..b0dd89f7 100644 --- a/backend/src/plugins/ModActions/commands/NoteCmd.ts +++ b/backend/src/plugins/ModActions/commands/NoteCmd.ts @@ -15,7 +15,7 @@ export const NoteCmd = modActionsCmd({ signature: { user: ct.string(), - note: ct.string({ catchAll: true }), + note: ct.string({ required: false, catchAll: true }), }, async run({ pluginData, message: msg, args }) { @@ -25,6 +25,11 @@ export const NoteCmd = modActionsCmd({ return; } + if (!args.note && msg.attachments.length === 0) { + sendErrorMessage(pluginData, msg.channel, "Text or attachment required"); + return; + } + const userName = `${user.username}#${user.discriminator}`; const reason = formatReasonWithAttachments(args.note, msg.attachments);