mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
cleanup(Guild): remove Guild#voice (#5091)
This commit is contained in:
@@ -168,7 +168,7 @@ class VoiceConnection extends EventEmitter {
|
||||
* @type {?VoiceState}
|
||||
*/
|
||||
get voice() {
|
||||
return this.channel.guild.voice;
|
||||
return this.channel.guild.me?.voice ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,8 +182,8 @@ class VoiceConnection extends EventEmitter {
|
||||
{
|
||||
guild_id: this.channel.guild.id,
|
||||
channel_id: this.channel.id,
|
||||
self_mute: this.voice ? this.voice.selfMute : false,
|
||||
self_deaf: this.voice ? this.voice.selfDeaf : false,
|
||||
self_mute: this.voice?.selfMute ?? false,
|
||||
self_deaf: this.voice?.selfDeaf ?? false,
|
||||
},
|
||||
options,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user