Convert !avatar, !jumbo, and !reload_guild

This commit is contained in:
Dragory 2020-07-06 02:47:39 +03:00
parent a0e46df19d
commit 302987cb17
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
5 changed files with 155 additions and 1 deletions

View file

@ -0,0 +1,20 @@
import { utilityCmd } from "../types";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { messageLink } from "../../../utils";
import { sendErrorMessage } from "../../../pluginUtils";
import { TextChannel } from "eris";
import { activeReloads } from "../guildReloads";
export const ReloadGuildCmd = utilityCmd({
trigger: "reload_guild",
description: "Reload the Zeppelin configuration and all plugins for the server. This can sometimes fix issues.",
permission: "can_reload_guild",
async run({ message: msg, args, pluginData }) {
if (activeReloads.has(pluginData.guild.id)) return;
activeReloads.set(pluginData.guild.id, msg.channel as TextChannel);
msg.channel.createMessage("Reloading...");
pluginData.getKnubInstance().reloadGuild(pluginData.guild.id);
},
});