Add override for bot owner and server owner
This commit is contained in:
parent
18e3f3d800
commit
0fceab7ba5
1 changed files with 14 additions and 12 deletions
|
@ -40,6 +40,7 @@ export class Util {
|
||||||
|
|
||||||
const requiredRoles = itemToUse.Command.Roles;
|
const requiredRoles = itemToUse.Command.Roles;
|
||||||
|
|
||||||
|
if (message.author.id != process.env.BOT_OWNERID && message.author.id != message.guild.ownerId) {
|
||||||
for (const i in requiredRoles) {
|
for (const i in requiredRoles) {
|
||||||
if (message.guild) {
|
if (message.guild) {
|
||||||
const setting = await SettingsHelper.GetSetting(`role.${requiredRoles[i]}`, message.guild?.id);
|
const setting = await SettingsHelper.GetSetting(`role.${requiredRoles[i]}`, message.guild?.id);
|
||||||
|
@ -55,6 +56,7 @@ export class Util {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const context: ICommandContext = {
|
const context: ICommandContext = {
|
||||||
name: name,
|
name: name,
|
||||||
|
|
Loading…
Reference in a new issue