Bot connection state ready but sometimes i don't hear it
Hi sometimes my bot don't speak but the connection state is ready, rn i have a voice channel where i have this bug and can hotswap code, is there anything that i can send so we can debug that?
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OP[email protected] and node v20.9.0
@discordjs/voice 0.16.1
Here is my getVoiceConnection log:
it's a shared player in all the bot and in another channel it works
so i suppose that the player is ready
lemme log it
How to log it @Qjuh
.state.subscription?
oh yeah
it's in idle
i though that the player was shared
but i use the subscribe method
what the player is in idle even in a channel where it plays
is this normal ? @Qjuh
i log the same thing for all channels and on a channel where i hear music it's also in idle
oh wait
that's because i log it before the bot switch in playing
Ok so i found how to check if the bot is not playing music
thank you so much
<ref *1> VoiceConnection {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
rejoinAttempts: 0,
_state: {
status: 'ready',
adapter: {
sendPayload: [Function: sendPayload],
destroy: [Function: destroy]
},
networking: Networking {
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
_state: [Object],
debug: null,
onWsOpen: [Function: bound onWsOpen],
onChildError: [Function: bound onChildError],
onWsPacket: [Function: bound onWsPacket],
onWsClose: [Function: bound onWsClose],
onWsDebug: [Function: bound onWsDebug],
onUdpDebug: [Function: bound onUdpDebug],
onUdpClose: [Function: bound onUdpClose],
[Symbol(kCapture)]: false
},
subscription: PlayerSubscription {
connection: [Circular *1],
player: [AudioPlayer]
}
},
joinConfig: {
selfDeaf: true,
selfMute: false,
group: 'default',
channelId: '1181667251804442635',
guildId: '707230275175841915',
adapterCreator: [Function (anonymous)]
},
packets: {
server: {
token: 'REDACTED',
guild_id: '707230275175841915',
endpoint: 'frankfurt7869.discord.media:443'
},
state: {
member: [Object],
user_id: '1181649600994623498',
suppress: false,
session_id: 'd4ac26fe45a170ceb921c42a6be80009',
self_video: false,
self_mute: false,
self_deaf: true,
request_to_speak_timestamp: null,
mute: false,
guild_id: '707230275175841915',
deaf: false,
channel_id: '1181667251804442635'
}
},
receiver: VoiceReceiver {
voiceConnection: [Circular *1],
ssrcMap: SSRCMap {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
map: Map(0) {},
[Symbol(kCapture)]: false
},
subscriptions: Map(0) {},
connectionData: {
ssrc: 21710,
encryptionMode: 'xsalsa20_poly1305_lite',
secretKey: [Uint8Array],
sequence: 53892,
timestamp: 3496997620,
nonce: 1822879,
nonceBuffer: <Buffer 00 1b d0 9f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,
speaking: true,
packetsPlayed: 1822878
},
speaking: SpeakingMap {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
users: Map(0) {},
speakingTimeouts: Map(0) {},
[Symbol(kCapture)]: false
},
onWsPacket: [Function: bound onWsPacket],
onUdpMessage: [Function: bound onUdpMessage]
},
debug: null,
onNetworkingClose: [Function: bound onNetworkingClose],
onNetworkingStateChange: [Function: bound onNetworkingStateChange],
onNetworkingError: [Function: bound onNetworkingError],
onNetworkingDebug: [Function: bound onNetworkingDebug],
[Symbol(kCapture)]: false
} 1181667251804442635
<ref *1> VoiceConnection {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
rejoinAttempts: 0,
_state: {
status: 'ready',
adapter: {
sendPayload: [Function: sendPayload],
destroy: [Function: destroy]
},
networking: Networking {
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
_state: [Object],
debug: null,
onWsOpen: [Function: bound onWsOpen],
onChildError: [Function: bound onChildError],
onWsPacket: [Function: bound onWsPacket],
onWsClose: [Function: bound onWsClose],
onWsDebug: [Function: bound onWsDebug],
onUdpDebug: [Function: bound onUdpDebug],
onUdpClose: [Function: bound onUdpClose],
[Symbol(kCapture)]: false
},
subscription: PlayerSubscription {
connection: [Circular *1],
player: [AudioPlayer]
}
},
joinConfig: {
selfDeaf: true,
selfMute: false,
group: 'default',
channelId: '1181667251804442635',
guildId: '707230275175841915',
adapterCreator: [Function (anonymous)]
},
packets: {
server: {
token: 'REDACTED',
guild_id: '707230275175841915',
endpoint: 'frankfurt7869.discord.media:443'
},
state: {
member: [Object],
user_id: '1181649600994623498',
suppress: false,
session_id: 'd4ac26fe45a170ceb921c42a6be80009',
self_video: false,
self_mute: false,
self_deaf: true,
request_to_speak_timestamp: null,
mute: false,
guild_id: '707230275175841915',
deaf: false,
channel_id: '1181667251804442635'
}
},
receiver: VoiceReceiver {
voiceConnection: [Circular *1],
ssrcMap: SSRCMap {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
map: Map(0) {},
[Symbol(kCapture)]: false
},
subscriptions: Map(0) {},
connectionData: {
ssrc: 21710,
encryptionMode: 'xsalsa20_poly1305_lite',
secretKey: [Uint8Array],
sequence: 53892,
timestamp: 3496997620,
nonce: 1822879,
nonceBuffer: <Buffer 00 1b d0 9f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,
speaking: true,
packetsPlayed: 1822878
},
speaking: SpeakingMap {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
users: Map(0) {},
speakingTimeouts: Map(0) {},
[Symbol(kCapture)]: false
},
onWsPacket: [Function: bound onWsPacket],
onUdpMessage: [Function: bound onUdpMessage]
},
debug: null,
onNetworkingClose: [Function: bound onNetworkingClose],
onNetworkingStateChange: [Function: bound onNetworkingStateChange],
onNetworkingError: [Function: bound onNetworkingError],
onNetworkingDebug: [Function: bound onNetworkingDebug],
[Symbol(kCapture)]: false
} 1181667251804442635
<ref *1> PlayerSubscription {
connection: <ref *2> VoiceConnection {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
rejoinAttempts: 0,
_state: {
status: 'ready',
adapter: [Object],
networking: [Networking],
subscription: [Circular *1]
},
joinConfig: {
selfDeaf: true,
selfMute: false,
group: 'default',
channelId: '1181667251804442635',
guildId: '707230275175841915',
adapterCreator: [Function (anonymous)]
},
packets: { server: [Object], state: [Object] },
receiver: VoiceReceiver {
voiceConnection: [Circular *2],
ssrcMap: [SSRCMap],
subscriptions: Map(0) {},
connectionData: [Object],
speaking: [SpeakingMap],
onWsPacket: [Function: bound onWsPacket],
onUdpMessage: [Function: bound onUdpMessage]
},
debug: null,
onNetworkingClose: [Function: bound onNetworkingClose],
onNetworkingStateChange: [Function: bound onNetworkingStateChange],
onNetworkingError: [Function: bound onNetworkingError],
onNetworkingDebug: [Function: bound onNetworkingDebug],
[Symbol(kCapture)]: false
},
player: AudioPlayer {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_state: { status: 'idle' },
subscribers: [
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[Circular *1],
[PlayerSubscription]
],
behaviors: { noSubscriber: 'play', maxMissedFrames: 5000 },
debug: [Function (anonymous)],
[Symbol(kCapture)]: false
}
}
<ref *1> PlayerSubscription {
connection: <ref *2> VoiceConnection {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
rejoinAttempts: 0,
_state: {
status: 'ready',
adapter: [Object],
networking: [Networking],
subscription: [Circular *1]
},
joinConfig: {
selfDeaf: true,
selfMute: false,
group: 'default',
channelId: '1181667251804442635',
guildId: '707230275175841915',
adapterCreator: [Function (anonymous)]
},
packets: { server: [Object], state: [Object] },
receiver: VoiceReceiver {
voiceConnection: [Circular *2],
ssrcMap: [SSRCMap],
subscriptions: Map(0) {},
connectionData: [Object],
speaking: [SpeakingMap],
onWsPacket: [Function: bound onWsPacket],
onUdpMessage: [Function: bound onUdpMessage]
},
debug: null,
onNetworkingClose: [Function: bound onNetworkingClose],
onNetworkingStateChange: [Function: bound onNetworkingStateChange],
onNetworkingError: [Function: bound onNetworkingError],
onNetworkingDebug: [Function: bound onNetworkingDebug],
[Symbol(kCapture)]: false
},
player: AudioPlayer {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_state: { status: 'idle' },
subscribers: [
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[PlayerSubscription],
[Circular *1],
[PlayerSubscription]
],
behaviors: { noSubscriber: 'play', maxMissedFrames: 5000 },
debug: [Function (anonymous)],
[Symbol(kCapture)]: false
}
}