File tree Expand file tree Collapse file tree 3 files changed +3
-26
lines changed Expand file tree Collapse file tree 3 files changed +3
-26
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ export interface HarmonixOptions {
2424 client : ClientOptions
2525 clientId : string
2626 ownerId : string [ ]
27- guildId : string [ ]
2827}
2928
3029type DeepPartial < T > =
You can’t perform that action at this time.
0 commit comments