Skip to content

Commit

Permalink
feat: Add global tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayfri committed Sep 12, 2021
1 parent 005e860 commit cb95a67
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/defaults/events/MessageCreateEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ export class MessageCreateEvent extends Event {

if (MessageCreateEvent.options.globalTags) {
const missingTags = Tag.check(commandContext, MessageCreateEvent.options.globalTags);
return argError(
commandContext,
`There are missing global tags for the message: \n\`${missingTags
.map(tag => Tag[tag])
.sort()
.join('\n')
.toUpperCase()}\``
);
if (missingTags.length > 0) {
return argError(
commandContext,
`There are missing global tags for the message: \n\`${missingTags
.map(tag => Tag[tag])
.sort()
.join('\n')
.toUpperCase()}\``
);
}
}

try {
Expand Down

0 comments on commit cb95a67

Please sign in to comment.