Skip to content

Commit 7b1e051

Browse files
author
xyzjesper
committed
Fixed Command loading for some guilds
1 parent 5b0caaf commit 7b1e051

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/helper/CommandHelper.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,18 @@ export class CommandHelper {
123123

124124
const restClient = new REST({version: "10"}).setToken(Config.Bot.DiscordBotToken);
125125

126+
127+
126128
// Clear application command
127129
await restClient.put(Routes.applicationCommands(Config.Bot.DiscordApplicationId), {
128130
body: [],
129131
});
130132

133+
// Clear Guild Commands
134+
await restClient.put(Routes.applicationGuildCommands(Config.Bot.DiscordApplicationId, guild.id), {
135+
body: [],
136+
});
137+
131138
const buildInCommandOverrides = await database.buildInCommands.findMany({
132139
where: {
133140
GuildCommandMangerId: guild.id
@@ -335,9 +342,14 @@ export class CommandHelper {
335342
body: [],
336343
});
337344

338-
339345
const allGuilds = await client.guilds.fetch();
340346
for (const guild of allGuilds.values()) {
347+
348+
// Clear Guild Commands
349+
await restClient.put(Routes.applicationGuildCommands(Config.Bot.DiscordApplicationId, guild.id), {
350+
body: [],
351+
});
352+
341353
const buildInCommandOverrides = await database.buildInCommands.findMany({
342354
where: {
343355
GuildCommandMangerId: guild.id

src/modules/userinstall/commands/userInstall/letmegooglethat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {ExtendedClient} from "../../../../types/ExtendedClient.js";
1010

1111
export default {
1212
data: new SlashCommandBuilder()
13-
.setName("let-me-google-that-for-you")
13+
.setName("let-me-google-that")
1414
.setDescription("Use the pupular tool 'Let me google that for you'")
1515
.setDescriptionLocalizations({
1616
de: "Benutze das beliebte Tool 'Let me google that for you'"

0 commit comments

Comments
 (0)