Error [VoiceNotStageChannel] You are only allowed to do this in stage channels.
why get this error?
Error [VoiceNotStageChannel]: You are only allowed to do this in stage channels.
const connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
});
if (voiceChannel.type === ChannelType.GuildStageVoice) {
await interaction.guild.members.me.voice.setSuppressed(false);
}
const connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
});
if (voiceChannel.type === ChannelType.GuildStageVoice) {
await interaction.guild.members.me.voice.setSuppressed(false);
}
2 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Error [VoiceNotStageChannel]: You are only allowed to do this in stage channels.
at VoiceState.edit (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\structures\VoiceState.js:223:67)
at VoiceState.setSuppressed (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\structures\VoiceState.js:287:17)
at Object.execute (C:\Users\user\Documents\Code_file\Discord-bot\code\commands\play.js:39:48)
at Client.<anonymous> (C:\Users\user\Documents\Code_file\Discord-bot\code\index.js:66:19)
at Client.emit (node:events:539:35)
at InteractionCreateAction.handle (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\actions\InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketManager.js:352:31)
at WebSocketShard.onPacket (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketShard.js:481:22)
at WebSocketShard.onMessage (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketShard.js:321:10) {
code: 'VoiceNotStageChannel'
}
Error [VoiceNotStageChannel]: You are only allowed to do this in stage channels.
at VoiceState.edit (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\structures\VoiceState.js:223:67)
at VoiceState.setSuppressed (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\structures\VoiceState.js:287:17)
at Object.execute (C:\Users\user\Documents\Code_file\Discord-bot\code\commands\play.js:39:48)
at Client.<anonymous> (C:\Users\user\Documents\Code_file\Discord-bot\code\index.js:66:19)
at Client.emit (node:events:539:35)
at InteractionCreateAction.handle (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\actions\InteractionCreate.js:81:12)
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketManager.js:352:31)
at WebSocketShard.onPacket (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketShard.js:481:22)
at WebSocketShard.onMessage (C:\Users\user\Documents\Code_file\Discord-bot\code\node_modules\discord.js\src\client\websocket\WebSocketShard.js:321:10) {
code: 'VoiceNotStageChannel'
}