Argument of type '"stateChange"' is not assignable to parameter of type 'VoiceConnectionStatus.Signalling'
See original GitHub issueWhich package is this bug report for?
voice
Issue description
- Copy this repo: https://github.com/kaaaxcreators/Discord-MusicBot/tree/develop
- Then try to build it
- Typescript Error:
Argument of type '"stateChange"' is not assignable to parameter of type 'VoiceConnectionStatus.Signalling'
here: https://github.com/kaaaxcreators/Discord-MusicBot/blob/f86381c6988348ca32d55ff1e383caf179d2e387/src/util/Music.ts#L61 and here https://github.com/kaaaxcreators/Discord-MusicBot/blob/f86381c6988348ca32d55ff1e383caf179d2e387/src/util/Music.ts#L122
Code sample
https://github.com/kaaaxcreators/Discord-MusicBot/blob/develop/src/util/Music.ts
(Its the discord/voice Music Bot example fitted to my needs)
Package version
0.8.0
Node.js version
16.13.2, 4.6.2
Operating system
Windows 10 21H1
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
Channel
Which gateway intents are you subscribing to?
Guilds, GuildEmojisAndStickers, GuildVoiceStates, GuildMessages, GuildMessageReactions, DirectMessages, DirectMessageReactions
I have tested this issue on a development release
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Argument of type [type] is not assignable to parameter of type ...
Think that this line hints to the main issue: Type 'firebase.firestore.CollectionReference' is not assignable to type 'FirebaseFirestore.
Read more >Class AudioPlayer - discordjs/voice
Will throw if attempting to play an audio resource that has already ended, or is being played by another player. Type parameters. T....
Read more >Voice Connections | discord.js Guide
Voice Connections. Voice connections represent connections to voice channels in a guild. You can only connect to one voice channel in a ...
Read more >Argument of type 'string' is not assignable to parameter of type
I'm new to Typescript and trying to do a project with it to get better, but I've been unable to solve this issue...
Read more >Argument of type NextHandleFunction is not assignable
How to fix the issue for the latest node express regarding with Argument of type NextHandleFunction is not assignable to parameter of type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Happens to me as well. Issue seems to be on the second half of
AudioPlayerEvents
andVoiceConnectionEvents
.Changing the line
status: status;
on bothAudioPlayerEvents
andVoiceConnectionEvents
to be a conditional type like below fixes the issue, as far as I can tell.Should I PR this change?
I have similar issue
The following snippet has the problem:
But this one doesn’t throw any error:
The workaround is following:
I assume the parameters somehow infer different type than “stateChange”.