You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
It shouldn't fail, even for posts without text.
To Reproduce
Post a new message without text. (only an image for example)
See the error
Additional context
One of the EventListeners had an uncaught exception java.lang.IllegalArgumentException: Name may not be empty
at net.dv8tion.jda.internal.utils.Checks.notEmpty(Checks.java:94)
at net.dv8tion.jda.internal.entities.channel.mixin.attribute.IThreadContainerMixin.createThreadChannel(IThreadContainerMixin.java:69)
at net.dv8tion.jda.internal.entities.ReceivedMessage.createThreadChannel(ReceivedMessage.java:946)
at org.togetherjava.tjbot.features.basic.SuggestionsUpDownVoter.createThread(SuggestionsUpDownVoter.java:70)
at org.togetherjava.tjbot.features.basic.SuggestionsUpDownVoter.onMessageReceived(SuggestionsUpDownVoter.java:52)
at org.togetherjava.tjbot.features.system.BotCore.lambda$onMessageReceived$9(BotCore.java:221)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.jav...
The bot tries to create a new thread and set the title of that thread using the text of the post:
Describe the bug
The bot automatically sets up the up/down votes and a thread to discuss a suggestion.
It fails to do so if someone creates a new post in
#server-suggestions
without text.For example: https://discord.com/channels/272761734820003841/480829495486447627/1305554470364643442
Expected behavior
It shouldn't fail, even for posts without text.
To Reproduce
Additional context
The bot tries to create a new thread and set the title of that thread using the text of the post:
It is missing checks if the text is empty.
What kind of default title would make sense?
The text was updated successfully, but these errors were encountered: