Skip to content

Commit 7967c8a

Browse files
committed
fix: remove guildOnly commands
1 parent b2582b3 commit 7967c8a

File tree

3 files changed

+3
-26
lines changed

3 files changed

+3
-26
lines changed

src/discord.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,11 @@ export const refreshApplicationCommands = async (harmonix: Harmonix) => {
2626
await rest.put(
2727
Routes.applicationCommands(harmonix.options.clientId || client.user.id),
2828
{
29-
body: commands
30-
.filter((cmd) => !cmd.config.guildOnly)
31-
.map((cmd) =>
32-
isHarmonixCommand(cmd) ? slashToJSON(cmd) : contextMenuToJSON(cmd)
33-
)
34-
}
35-
)
36-
if (harmonix.options.guildId) {
37-
for (const guildId of harmonix.options.guildId) {
38-
await rest.put(
39-
Routes.applicationGuildCommands(
40-
harmonix.options.clientId || client.user.id,
41-
guildId
42-
),
43-
{
44-
body: commands
45-
.filter((cmd) => cmd.config.guildOnly)
46-
.map((cmd) =>
47-
isHarmonixCommand(cmd)
48-
? slashToJSON(cmd)
49-
: contextMenuToJSON(cmd)
50-
)
51-
}
29+
body: commands.map((cmd) =>
30+
isHarmonixCommand(cmd) ? slashToJSON(cmd) : contextMenuToJSON(cmd)
5231
)
5332
}
54-
}
33+
)
5534
consola.success('Successfully reloaded application commands.\n')
5635
const readyEvent = harmonix.events.get('ready')
5736

src/types/commands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export interface CommandConfig<T extends OptionsDef = OptionsDef> {
123123
options?: T
124124
nsfw?: boolean
125125
userPermissions?: PermissionsString[]
126-
guildOnly?: boolean
127126
preconditions?: string[]
128127
}
129128

src/types/harmonix.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export interface HarmonixOptions {
2424
client: ClientOptions
2525
clientId: string
2626
ownerId: string[]
27-
guildId: string[]
2827
}
2928

3029
type DeepPartial<T> =

0 commit comments

Comments
 (0)