mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
21 lines
667 B
TypeScript
21 lines
667 B
TypeScript
import { TextChannel } from "discord.js";
|
|
import { isStaffPreFilter } from "../../../pluginUtils";
|
|
import { getActiveReload, setActiveReload } from "../activeReload";
|
|
import { botControlCmd } from "../types";
|
|
|
|
export const ReloadGlobalPluginsCmd = botControlCmd({
|
|
trigger: "bot_reload_global_plugins",
|
|
permission: null,
|
|
config: {
|
|
preFilters: [isStaffPreFilter],
|
|
},
|
|
|
|
async run({ pluginData, message }) {
|
|
if (getActiveReload()) return;
|
|
|
|
setActiveReload((message.channel as TextChannel).guild?.id, message.channel.id);
|
|
await message.channel.send("Reloading global plugins...");
|
|
|
|
pluginData.getKnubInstance().reloadGlobalContext();
|
|
},
|
|
});
|