mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 00:05:04 +00:00
21 lines
673 B
TypeScript
21 lines
673 B
TypeScript
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",
|
|
permission: null,
|
|
config: {
|
|
preFilters: [isOwnerPreFilter],
|
|
},
|
|
|
|
async run({ pluginData, message }) {
|
|
if (getActiveReload()) return;
|
|
|
|
setActiveReload((message.channel as TextChannel).guild?.id, message.channel.id);
|
|
await message.channel.createMessage("Reloading global plugins...");
|
|
|
|
pluginData.getKnubInstance().reloadAllGlobalPlugins();
|
|
},
|
|
});
|