@@ -108,13 +108,16 @@ export class ApplicationCommandRegistry {
108
108
109
109
const guildIdsToRegister = this . getGuildIdsToRegister ( options ) ;
110
110
111
+ const registerOptions = {
112
+ registerCommandIfMissing : true ,
113
+ behaviorWhenNotIdentical : getDefaultBehaviorWhenNotIdentical ( ) ,
114
+ guildIds : guildIdsToRegister ,
115
+ ...( options ?? { } )
116
+ } ;
117
+
111
118
this . apiCalls . push ( {
112
119
builtData,
113
- registerOptions : options ?? {
114
- registerCommandIfMissing : true ,
115
- behaviorWhenNotIdentical : getDefaultBehaviorWhenNotIdentical ( ) ,
116
- guildIds : guildIdsToRegister
117
- } ,
120
+ registerOptions,
118
121
type : InternalRegistryAPIType . ChatInput
119
122
} ) ;
120
123
@@ -143,13 +146,16 @@ export class ApplicationCommandRegistry {
143
146
144
147
const guildIdsToRegister = this . getGuildIdsToRegister ( options ) ;
145
148
149
+ const registerOptions = {
150
+ registerCommandIfMissing : true ,
151
+ behaviorWhenNotIdentical : getDefaultBehaviorWhenNotIdentical ( ) ,
152
+ guildIds : guildIdsToRegister ,
153
+ ...( options ?? { } )
154
+ } ;
155
+
146
156
this . apiCalls . push ( {
147
157
builtData,
148
- registerOptions : options ?? {
149
- registerCommandIfMissing : true ,
150
- behaviorWhenNotIdentical : getDefaultBehaviorWhenNotIdentical ( ) ,
151
- guildIds : guildIdsToRegister
152
- } ,
158
+ registerOptions,
153
159
type : InternalRegistryAPIType . ContextMenu
154
160
} ) ;
155
161
0 commit comments