How to Throw an Error when Bot Can't Invite Itself to Speak in Stage Channel

I was wondering what permissions I need to check to see if a bot can't invite itself to speak in a stage channel or not? Any help is greatly appreciated.
14 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dzlandis
dzlandisOP3y ago
I've tried:
if (guildMe.voice.suppress === true && !guildMe.permissions.has(PermissionFlagsBits.MuteMembers)) return;
if (guildMe.voice.suppress === true && !guildMe.permissions.has(PermissionFlagsBits.MuteMembers)) return;
But that doesn't appear to work and I just get a Discord API error.
Jaworek
Jaworek3y ago
what error? and what has muting members to do?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dzlandis
dzlandisOP3y ago
Muting Members is the permission that the bot needs to move itself to speak in a stage channel Nvm I misunderstood
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dzlandis
dzlandisOP3y ago
Untrue from what I can see
d.js docs
d.js docs3y ago
property (static) PermissionsBitField.StageModerator Bitfield representing the permissions required for moderators of stage channels
Jaworek
Jaworek3y ago
hehe
dzlandis
dzlandisOP3y ago
Well I'm pretty confident that the permission is MuteMembers that I need to check I just don't understand why it isn't working
Jaworek
Jaworek3y ago
if member is not suppressed it should be able to speak( if not muted )
dzlandis
dzlandisOP3y ago
Let me rephrase what I'm trying to do I'm trying to make the bot automatically make itself a speaker if it has permission to And if it doesn't, it throws an error Hope that clears things up regarding what I'm trying to do
Jaworek
Jaworek3y ago
so your bot needs StageModerator perms a u can also check if suppressed is not false
dzlandis
dzlandisOP3y ago
I fixed it, this is false I was right that it only needed Mute Members perms I was just not checking the channel perms and was instead checking the bot perms
Want results from more Discord servers?
Add your server