File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ module.exports = class LangCommand extends BotCommand {
28
28
}
29
29
30
30
hasPerm ( msg ) {
31
- return msg . guild . member ( msg . author ) . hasPermission ( 'ADMINISTRATOR' ) ;
31
+ if ( msg . client . isOwner ( msg . author . id ) ) return true ;
32
+ else return msg . guild . member ( msg . author ) . hasPermission ( 'ADMINISTRATOR' ) ;
32
33
}
33
34
34
35
run ( msg , { language} ) {
@@ -41,8 +42,8 @@ module.exports = class LangCommand extends BotCommand {
41
42
} , msg . client . getGuildLocale ( msg . guild ) ) ) ;
42
43
}
43
44
else {
44
- if ( this . hasPerm ( msg ) ) {
45
-
45
+ if ( ! this . hasPerm ( msg ) ) {
46
+ return msg . say ( i18n . __ll ( 'commands.lang.execute.noPermission' , msg . guild ) ) ;
46
47
} else {
47
48
//return msg.reply('access denied. (needs translation)');
48
49
//i18n.setLocale(language);
Original file line number Diff line number Diff line change 108
108
},
109
109
"execute" : {
110
110
"get" : " The current language is: `%s`" ,
111
- "set" : " Language setting changed to `%s`."
111
+ "set" : " Language setting changed to `%s`." ,
112
+ "noPermission" : " You don't have `ADMINISTRATOR` permission to do that."
112
113
}
113
114
},
114
115
"activate" : {
Original file line number Diff line number Diff line change 108
108
},
109
109
"execute" : {
110
110
"get" : " 현재 언어: %s" ,
111
- "set" : " 언어 설정이 `%s`(으)로 바뀌었습니다."
111
+ "set" : " 언어 설정이 `%s`(으)로 바뀌었습니다." ,
112
+ "noPermission" : " commands.lang.execute.noPermission"
112
113
}
113
114
},
114
115
"activate" : {
You can’t perform that action at this time.
0 commit comments