File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,14 @@ class CommandPermissions {
194194 * @memberof Command
195195 */
196196 canExecute ( msg , guildConf ) {
197+ // If DM
198+ if ( ! guildConf ) {
199+ if ( this . staff . needed . length && ! this . staff . needed . includes ( this . library . message . getAuthorID ( msg ) ) ) {
200+ return [ false , 'Bot Staff' ] ;
201+ }
202+ return [ true ] ;
203+ }
204+
197205 const member = this . library . message . getMember ( msg ) ;
198206 const channel = this . library . message . getChannel ( msg ) ;
199207 const guild = this . library . channel . getGuild ( channel ) ;
@@ -208,14 +216,6 @@ class CommandPermissions {
208216 return [ true ] ;
209217 }
210218
211- // If DM
212- if ( ! guildConf ) {
213- if ( this . staff . needed . length && ! this . staff . needed . includes ( msg . author . id ) ) {
214- return [ false , 'Invalid permissions' ] ;
215- }
216- return [ true ] ;
217- }
218-
219219 // Needed: server staff
220220 if ( ( guildConf . modOnly || this . serverMod ) && ! this . axonUtils . isServerMod ( member , guildConf ) ) {
221221 return [ false , 'Server Mod' ] ;
You can’t perform that action at this time.
0 commit comments