Open
Description
Which package has the bugs?
The core library
Issue description
Steps to reproduce:
- Do not join any voice channel
- call the following snippet
- The following exception gets thrown:
node:events:496
throw er; // Unhandled 'error' event
^
TypeError: Cannot read properties of undefined (reading 'cache')
at get channel (\discord-tests\self-bot\node_modules\discord.js-selfbot-v13\src\structures\VoiceState.js:155:49)
Code sample
const channel = client.user?.voice?.channel;
Package version
3.6.1
Node.js version
v22.10.0
Operating system
windows
Priority this issue should have
Low (slightly annoying)
Checklist
- I have searched the open issues for duplicates.
- I have shared the entire traceback.
- I am using a user token (and it isn't visible in the code).
Additional Information
No response