Skip to content

Commit

Permalink
Warn when invalid intent is supplied (abalabahaha#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsian03 committed Aug 19, 2021
1 parent a7bff54 commit 1e95e62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ class Client extends EventEmitter {
for(const intent of this.options.intents) {
if(Constants.Intents[intent]) {
bitmask |= Constants.Intents[intent];
} else {
this.emit("warn", `Unknown intent: ${intent}`);
}
}
this.options.intents = bitmask;
Expand Down

0 comments on commit 1e95e62

Please sign in to comment.