JDA
JDA copied to clipboard
Cannot add reactions to messages in forum threads
trafficstars
General Troubleshooting
- [X] I have checked for similar issues on the Issue-tracker.
- [X] I have updated to the latest JDA version
- [X] I have checked the branches or the maintainers' PRs for upcoming bug fixes.
Expected Behaviour
When adding reactions to forum thread messages, JDA should be able to add reactions to messages in form threads
Code Example for Reproduction Steps
suspend fun executeFavCommand(storage: Storage, event: SlashCommandInteractionEvent) {
val interaction = event.reply("Fetching candidates...").await()
val original = interaction.retrieveOriginal().await()
original.addReaction("👍").await()
original.addReaction("👎").await()
}
Code for JDABuilder or DefaultShardManagerBuilder used
val jda = JDABuilder.createDefault(env.authToken).build()
Exception or Error
java.lang.NullPointerException: Cannot invoke "net.dv8tion.jda.api.entities.GuildChannel.getPermissionContainer()" because "channel" is null
at net.dv8tion.jda.internal.entities.mixin.channel.middleman.GuildChannelMixin.hasPermission(GuildChannelMixin.java:48)
at net.dv8tion.jda.internal.entities.mixin.channel.middleman.GuildChannelMixin.checkPermission(GuildChannelMixin.java:51)
at net.dv8tion.jda.internal.entities.mixin.channel.middleman.GuildMessageChannelMixin.checkCanAccessChannel(GuildMessageChannelMixin.java:107)
at net.dv8tion.jda.internal.entities.mixin.channel.middleman.MessageChannelMixin.addReactionBy
Forums are implemented by #2184, can you try with that instead?
@MinnDevelopment Will give it a try, thanks for the hint
Fixed in 5.0.0-alpha.20