Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add reactions to messages in forum threads #2213

Closed
3 tasks done
ApoY2k opened this issue Aug 10, 2022 · 3 comments
Closed
3 tasks done

Cannot add reactions to messages in forum threads #2213

ApoY2k opened this issue Aug 10, 2022 · 3 comments

Comments

@ApoY2k
Copy link

ApoY2k commented Aug 10, 2022

General Troubleshooting

  • I have checked for similar issues on the Issue-tracker.
  • I have updated to the latest JDA version
  • 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
@MinnDevelopment
Copy link
Member

Forums are implemented by #2184, can you try with that instead?

@ApoY2k
Copy link
Author

ApoY2k commented Aug 10, 2022

@MinnDevelopment Will give it a try, thanks for the hint

@MinnDevelopment
Copy link
Member

MinnDevelopment commented Sep 21, 2022

Fixed in 5.0.0-alpha.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants