mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
Fixed note command not allowing only attachments (#144)
This commit is contained in:
parent
b74c7fae43
commit
d4d89327fd
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue