the funny
This commit is contained in:
parent
5a555b7bb0
commit
09a573a2d3
118 changed files with 15738 additions and 24427 deletions
|
@ -1,6 +1,7 @@
|
|||
import { isStaffPreFilter, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getActiveReload, setActiveReload } from "../activeReload";
|
||||
import { botControlCmd } from "../types";
|
||||
import { TextBasedChannelFields } from "discord.js";
|
||||
|
||||
export const ReloadGlobalPluginsCmd = botControlCmd({
|
||||
trigger: "bot_reload_global_plugins",
|
||||
|
@ -14,13 +15,13 @@ export const ReloadGlobalPluginsCmd = botControlCmd({
|
|||
|
||||
const guildId = "guild" in message.channel ? message.channel.guild.id : null;
|
||||
if (!guildId) {
|
||||
sendErrorMessage(pluginData, message.channel, "This command can only be used in a server");
|
||||
await sendErrorMessage(pluginData, message.channel, "This command can only be used in a server");
|
||||
return;
|
||||
}
|
||||
|
||||
setActiveReload(guildId, message.channel.id);
|
||||
await message.channel.send("Reloading global plugins...");
|
||||
await (message.channel as TextBasedChannelFields).send("Reloading global plugins...");
|
||||
|
||||
pluginData.getKnubInstance().reloadGlobalContext();
|
||||
await pluginData.getKnubInstance().reloadGlobalContext();
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue