chore(deps): bump @discordjs/voice
This commit is contained in:
parent
e45169780f
commit
ebfe2886ff
3769
package-lock.json
generated
3769
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -55,22 +55,17 @@
|
||||
"@discordjs/collection": "^0.7.0",
|
||||
"@discordjs/voice": "^0.10.0",
|
||||
"@sapphire/async-queue": "^1.3.1",
|
||||
"@sapphire/snowflake": "^3.2.2",
|
||||
"@types/node-fetch": "^2.6.1",
|
||||
"@types/ws": "^8.5.3",
|
||||
"axios": "^0.27.2",
|
||||
"bignumber.js": "^9.0.2",
|
||||
"bufferutil": "^4.0.6",
|
||||
"chalk": "^4.1.2",
|
||||
"discord-api-types": "^0.35.0",
|
||||
"discord-bettermarkdown": "^1.2.0",
|
||||
"discord-rpc-contructor": "^1.1.5",
|
||||
"form-data": "^4.0.0",
|
||||
"json-bigint": "^1.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash.snakecase": "^4.1.1",
|
||||
"node-fetch": "^2.6.1",
|
||||
"npm": "^8.12.1",
|
||||
"qrcode-terminal": "^0.12.0",
|
||||
"safe-base64": "^2.0.1-0",
|
||||
"string_decoder": "^1.3.0",
|
||||
|
@ -63,30 +63,28 @@ 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 || !server.endpoint) return;
|
||||
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);
|
||||
if (!server || !state || this.state.status === VoiceConnectionStatus.Destroyed /* Destroyed */ || !server.endpoint)
|
||||
return;
|
||||
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);
|
||||
this.state = {
|
||||
...this.state,
|
||||
status: VoiceConnectionStatus.Connecting,
|
||||
networking,
|
||||
status: VoiceConnectionStatus.Connecting /* Connecting */,
|
||||
networking
|
||||
};
|
||||
};
|
||||
client.emit(
|
||||
Events.DEBUG,
|
||||
`${chalk.greenBright('[OK]')} Patched VoiceConnection.prototype.configureNetworking [@discordjs/voice]`,
|
||||
`${chalk.greenBright('[OK]')} Patched VoiceConnection.prototype.configureNetworking [@discordjs/voice - v0.10.0]`,
|
||||
);
|
||||
/* eslint-enable */
|
||||
}
|
||||
@ -128,11 +126,11 @@ module.exports = (client, { d: data }, shard) => {
|
||||
*/
|
||||
|
||||
/*
|
||||
for (const object of data.read_state) {
|
||||
if (object.mention_count == 0) continue;
|
||||
client.user.messageMentions.set(object.id, object);
|
||||
}
|
||||
*/
|
||||
for (const object of data.read_state) {
|
||||
if (object.mention_count == 0) continue;
|
||||
client.user.messageMentions.set(object.id, object);
|
||||
}
|
||||
*/
|
||||
|
||||
for (const guild of data.guilds) {
|
||||
guild.shardId = shard.id;
|
||||
|
@ -77,7 +77,7 @@ class DiscordAuthWebsocket {
|
||||
if (this.debug) console.log(`[WebSocket] Packet receive`, data);
|
||||
let op = data.op;
|
||||
if (op == Messages.HELLO) {
|
||||
console.log('[WebSocket] Attempting server handshake...');
|
||||
if (this.debug) console.log('[WebSocket] Attempting server handshake...');
|
||||
this.heartbeat_interval = setInterval(() => {
|
||||
this.heartbeat_sender();
|
||||
}, data.heartbeat_interval);
|
||||
|
1616
src/util/Voice.js
1616
src/util/Voice.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user