Please describe the problem you are having in as much detail as possible:
N/A
Include a reproducible code sample here, if possible:
N/A
Further details:
Basically, GuildMember#speaking isn't accessable unless the bot is in the channel; but still returns false. I feel it'd be best to check if the bot has the same channel the member, and if not, return null.
discord.js version: Master
If its false or null doesnt really make a difference. IMO there is no reason that the lib should return null if the bot isnt in the same channel as a member.... returning false just means hes either not talking OR that the bot cant see it cause hes not in the same channel.
I already explained this a couple hours ago and he said he'll close it 🤔.
I can see the use in it as returning null would mean you can differentiate between "definitely not talking" and "might be talking", while still being able to use it as it is now. Either way, we should make a note of the current behaviour in docs anyway.
Hi, I added this in the above commit :smile:
If the client isn't aware of whether the member is speaking, then member.speaking === undefined, otherwise it will be true/false depending on whether the member is speaking.
This information is only available if the client is connected to any voice channel in a guild.
Wonderful! Didn't realise it was if the client is in ANY channel - perhaps make that a little more clear in the documentation?
/**
* Whether this member is speaking. If the client isn't connected to a channel within the guild, then this will be undefined. Otherwise it will be
* true/false
* @type {?boolean}
* @name GuildMember#speaking
*/
Something like that I feel might be a little more clear. Thanks Hydra! (:
Most helpful comment
I can see the use in it as returning null would mean you can differentiate between "definitely not talking" and "might be talking", while still being able to use it as it is now. Either way, we should make a note of the current behaviour in docs anyway.