3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Update to Knub30.0.0-beta.37 and Eris 0.15, first pass

This commit is contained in:
Dragory 2021-05-23 14:35:16 +03:00
parent 84da543205
commit f6be4f4af6
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
133 changed files with 6507 additions and 380 deletions

View file

@ -27,7 +27,8 @@ const defaultOptions = {
},
};
export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()("bot_control", {
export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()({
name: "bot_control",
configSchema: ConfigSchema,
defaultOptions,
@ -46,7 +47,7 @@ export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()("bo
EligibleCmd,
],
onLoad(pluginData) {
afterLoad(pluginData) {
pluginData.state.archives = new GuildArchives(0);
pluginData.state.allowedGuilds = new AllowedGuilds();
pluginData.state.configs = new Configs();

View file

@ -2,7 +2,8 @@ import { botControlCmd } from "../types";
import { isOwnerPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { ApiPermissions } from "@shared/apiPermissions";
import { resolveUser } from "../../../utils";
import { resolveUser, UnknownUser } from "../../../utils";
import { User } from "eris";
export const ListDashboardUsersCmd = botControlCmd({
trigger: ["list_dashboard_users"],

View file

@ -16,6 +16,6 @@ export const ReloadGlobalPluginsCmd = botControlCmd({
setActiveReload((message.channel as TextChannel).guild?.id, message.channel.id);
await message.channel.createMessage("Reloading global plugins...");
pluginData.getKnubInstance().reloadAllGlobalPlugins();
pluginData.getKnubInstance().reloadGlobalContext();
},
});

View file

@ -1,6 +1,6 @@
import * as t from "io-ts";
import { tNullable } from "../../utils";
import { BasePluginType, globalCommand, globalEventListener } from "knub";
import { BasePluginType, typedGlobalCommand, typedGlobalEventListener } from "knub";
import { GuildArchives } from "../../data/GuildArchives";
import { AllowedGuilds } from "../../data/AllowedGuilds";
import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments";
@ -23,5 +23,5 @@ export interface BotControlPluginType extends BasePluginType {
};
}
export const botControlCmd = globalCommand<BotControlPluginType>();
export const botControlEvt = globalEventListener<BotControlPluginType>();
export const botControlCmd = typedGlobalCommand<BotControlPluginType>();
export const botControlEvt = typedGlobalEventListener<BotControlPluginType>();