mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
25 lines
497 B
JavaScript
25 lines
497 B
JavaScript
const AbstractHandler = require('./AbstractHandler');
|
|
|
|
/*
|
|
{
|
|
"token": "my_token",
|
|
"guild_id": "41771983423143937",
|
|
"endpoint": "smart.loyal.discord.gg"
|
|
}
|
|
*/
|
|
|
|
class VoiceServerUpdate extends AbstractHandler {
|
|
|
|
handle(packet) {
|
|
const data = packet.d;
|
|
const client = this.packetManager.client;
|
|
|
|
if (client.voice.pending.has(data.guild_id)) {
|
|
client.voice._receivedVoiceServer(data.guild_id, data.token, data.endpoint);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = VoiceServerUpdate;
|