Convert !avatar, !jumbo, and !reload_guild
This commit is contained in:
parent
a0e46df19d
commit
302987cb17
5 changed files with 155 additions and 1 deletions
20
backend/src/plugins/Utility/commands/ReloadGuildCmd.ts
Normal file
20
backend/src/plugins/Utility/commands/ReloadGuildCmd.ts
Normal 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);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue