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

More rework progress, remove all eris imports

This commit is contained in:
Dark 2021-06-01 02:05:55 +02:00
parent 8f7a6510eb
commit 52839cc9f3
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
181 changed files with 352 additions and 343 deletions

View file

@ -1,7 +1,7 @@
import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint";
import { BotControlPluginType, ConfigSchema } from "./types";
import { GuildArchives } from "../../data/GuildArchives";
import { TextChannel } from "eris";
import { sendSuccessMessage } from "../../pluginUtils";
import { getActiveReload, resetActiveReload } from "./activeReload";
import { ReloadGlobalPluginsCmd } from "./commands/ReloadGlobalPluginsCmd";
@ -18,6 +18,7 @@ import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments";
import { ListDashboardUsersCmd } from "./commands/ListDashboardUsersCmd";
import { ListDashboardPermsCmd } from "./commands/ListDashboardPermsCmd";
import { EligibleCmd } from "./commands/EligibleCmd";
import { TextChannel } from "discord.js";
const defaultOptions = {
config: {
@ -47,7 +48,7 @@ export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()({
EligibleCmd,
],
afterLoad(pluginData) {
async afterLoad(pluginData) {
pluginData.state.archives = new GuildArchives(0);
pluginData.state.allowedGuilds = new AllowedGuilds();
pluginData.state.configs = new Configs();
@ -58,9 +59,9 @@ export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()({
const [guildId, channelId] = activeReload;
resetActiveReload();
const guild = pluginData.client.guilds.get(guildId);
const guild = await pluginData.client.guilds.fetch(guildId);
if (guild) {
const channel = guild.channels.get(channelId);
const channel = guild.channels.cache.get(channelId);
if (channel instanceof TextChannel) {
sendSuccessMessage(pluginData, channel, "Global plugins reloaded!");
}

View file

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

View file

@ -1,7 +1,6 @@
import { botControlCmd } from "../types";
import { isOwnerPreFilter } from "../../../pluginUtils";
import { getActiveReload, setActiveReload } from "../activeReload";
import { TextChannel } from "eris";
export const ReloadGlobalPluginsCmd = botControlCmd({
trigger: "bot_reload_global_plugins",