ClassCastException on new channel types
See original GitHub issueWhen calling GuildBehavior.channels
and colleting the resulting Flow
, and the guild contains one of the new channel types, it throws a ClassCastException
:
java.lang.ClassCastException: class dev.kord.core.entity.channel.Channel$Companion$from$1 cannot be cast to class dev.kord.core.entity.channel.GuildChannel
Probably because the new channels aren’t implemented and therefore are an anonymous Channel
, which of course is not a GuildChannel
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to resolve a ClassCastException error message in ...
Double-click the channel to see which fields are being converted. The Output Data Type on the far right will appear in green for...
Read more >Why am I getting this ClassCastException in my AsyncTask?
I declared an new AsyncTask<Void, Void, Void>() and for unknown reasons, I got the same exception as the OP. When I changed it...
Read more >Fixing ClassCastException - YouTube
A ClassCastException occurs when you attempt to cast an object to a variable type that does not represent it. In this video, we...
Read more >ClassCastException (Java Platform SE 7 ) - Oracle Help Center
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For...
Read more >ERROR:" java.lang.ClassCastException" while creating new ...
ERROR:" java.lang.ClassCastException" while creating new entity and when "SearchBeforeCreate" was configured in MDM ...
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
FTR, at least right now, users are encouraged to make use of the KordEx snapshots. I’ll get another stable release out once Kord hits Kotlin 1.5.
kord-extensions:1.4.0-RC depends on a snaptshot from before the fix was applied (26 feb vs Apr13). This should be fixed (for cache at least) when the author updates their dependency and will be completely fixed in the next Kord release.