the funny

This commit is contained in:
Lara 2024-11-02 14:55:29 +02:00
parent 5a555b7bb0
commit 09a573a2d3
Signed by: laratheprotogen
GPG key ID: 5C0296EB3165F98B
118 changed files with 15738 additions and 24427 deletions

View file

@ -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();
},
});