mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Add bot owner commands for adding/removing servers and dashboard users
This commit is contained in:
parent
cd4b7a2f97
commit
5d13322439
8 changed files with 195 additions and 1 deletions
|
@ -8,6 +8,11 @@ import { ReloadGlobalPluginsCmd } from "./commands/ReloadGlobalPluginsCmd";
|
|||
import { ServersCmd } from "./commands/ServersCmd";
|
||||
import { LeaveServerCmd } from "./commands/LeaveServerCmd";
|
||||
import { ReloadServerCmd } from "./commands/ReloadServerCmd";
|
||||
import { AllowedGuilds } from "../../data/AllowedGuilds";
|
||||
import { AllowServerCmd } from "./commands/AllowServerCmd";
|
||||
import { DisallowServerCmd } from "./commands/DisallowServerCmd";
|
||||
import { AddDashboardUserCmd } from "./commands/AddDashboardUserCmd";
|
||||
import { RemoveDashboardUserCmd } from "./commands/RemoveDashboardUserCmd";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -20,10 +25,21 @@ export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()("bo
|
|||
configSchema: ConfigSchema,
|
||||
defaultOptions,
|
||||
|
||||
commands: [ReloadGlobalPluginsCmd, ServersCmd, LeaveServerCmd, ReloadServerCmd],
|
||||
// prettier-ignore
|
||||
commands: [
|
||||
ReloadGlobalPluginsCmd,
|
||||
ServersCmd,
|
||||
LeaveServerCmd,
|
||||
ReloadServerCmd,
|
||||
AllowServerCmd,
|
||||
DisallowServerCmd,
|
||||
AddDashboardUserCmd,
|
||||
RemoveDashboardUserCmd,
|
||||
],
|
||||
|
||||
onLoad(pluginData) {
|
||||
pluginData.state.archives = new GuildArchives(0);
|
||||
pluginData.state.allowedGuilds = new AllowedGuilds();
|
||||
|
||||
if (getActiveReload()) {
|
||||
const [guildId, channelId] = getActiveReload();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue