java.lang.UnsupportedOperationException: Cannot build a Message with no content. (You never added any content to the message)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via spigotmc.org by Unknown author, 1 year ago
Cannot build a Message with no content. (You never added any content to the message)
java.lang.UnsupportedOperationException: Cannot build a Message with no content. (You never added any content to the message)
at net.dv8tion.jda.MessageBuilder.build(MessageBuilder.java:173)
at net.dv8tion.jda.entities.impl.TextChannelImpl.sendMessage(TextChannelImpl.java:144)
at io.github.lxgaming.discordbot.commands.BotCommand.bot(BotCommand.java:11)
at io.github.lxgaming.discordbot.listeners.MessageListener.onMessageReceived(MessageListener.java:33)
at net.dv8tion.jda.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:176)
at net.dv8tion.jda.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:57)
at net.dv8tion.jda.handle.MessageReceivedHandler.handleInternally(MessageReceivedHandler.java:65)
at net.dv8tion.jda.handle.SocketHandler.handle(SocketHandler.java:36)
at net.dv8tion.jda.requests.WebSocketClient.handleEvent(WebSocketClient.java:545)
at net.dv8tion.jda.requests.WebSocketClient.onTextMessage(WebSocketClient.java:296)
at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:261)
at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:239)
at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:946)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:729)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:109)
at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:65)

Users with the same issue

2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.