fix: pass in the expected query object type for application commands
v13.9 #8189
This commit is contained in:
parent
f3a8c3a666
commit
51febce077
@ -63,23 +63,31 @@ module.exports = (client, { d: data }, shard) => {
|
||||
/* eslint-disable */
|
||||
VoiceConnection.prototype.configureNetworking = function () {
|
||||
const { server, state } = this.packets;
|
||||
if (!server || !state || this.state.status === VoiceConnectionStatus.Destroyed /* Destroyed */ || !server.endpoint)
|
||||
if (
|
||||
!server ||
|
||||
!state ||
|
||||
this.state.status === VoiceConnectionStatus.Destroyed /* Destroyed */ ||
|
||||
!server.endpoint
|
||||
)
|
||||
return;
|
||||
const networking = new Networking({
|
||||
const networking = new Networking(
|
||||
{
|
||||
endpoint: server.endpoint,
|
||||
serverId: server.guild_id ?? server.channel_id,
|
||||
token: server.token,
|
||||
sessionId: state.session_id,
|
||||
userId: state.user_id
|
||||
}, Boolean(this.debug));
|
||||
networking.once("close", this.onNetworkingClose);
|
||||
networking.on("stateChange", this.onNetworkingStateChange);
|
||||
networking.on("error", this.onNetworkingError);
|
||||
networking.on("debug", this.onNetworkingDebug);
|
||||
userId: state.user_id,
|
||||
},
|
||||
Boolean(this.debug),
|
||||
);
|
||||
networking.once('close', this.onNetworkingClose);
|
||||
networking.on('stateChange', this.onNetworkingStateChange);
|
||||
networking.on('error', this.onNetworkingError);
|
||||
networking.on('debug', this.onNetworkingDebug);
|
||||
this.state = {
|
||||
...this.state,
|
||||
status: VoiceConnectionStatus.Connecting /* Connecting */,
|
||||
networking
|
||||
networking,
|
||||
};
|
||||
};
|
||||
client.emit(
|
||||
|
@ -104,10 +104,7 @@ class ApplicationCommandManager extends CachedManager {
|
||||
headers: {
|
||||
'X-Discord-Locale': locale,
|
||||
},
|
||||
query:
|
||||
typeof withLocalizations === 'boolean'
|
||||
? new URLSearchParams({ with_localizations: withLocalizations })
|
||||
: undefined,
|
||||
query: typeof withLocalizations === 'boolean' ? { with_localizations: withLocalizations } : undefined,
|
||||
});
|
||||
return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection());
|
||||
}
|
||||
|
1500
src/util/Voice.js
1500
src/util/Voice.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user