mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-18 07:35:02 +00:00
Add a standardized way of checking for bot owners in global plugins
This commit is contained in:
parent
3ef23bd871
commit
1912961451
2 changed files with 6 additions and 9 deletions
|
@ -110,4 +110,9 @@ export class GlobalZeppelinPlugin<TConfig extends {} = IBasePluginConfig> extend
|
|||
const mergedOptions = this.getMergedOptions(); // This implicitly also validates the config
|
||||
return super.runLoad();
|
||||
}
|
||||
|
||||
protected isOwner(userId) {
|
||||
const owners = this.knub.getGlobalConfig().owners || [];
|
||||
return owners.includes(userId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue