3
0
Fork 0
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:
Dragory 2020-10-10 14:21:59 +03:00
parent cd4b7a2f97
commit 5d13322439
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 195 additions and 1 deletions

View file

@ -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();