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

spigotmc.org | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Bungee - Proxy - DiscordBot - Bungeecord Edition | Page 3 | SpigotMC - High Performance Minecraft

    spigotmc.org | 6 months ago
    java.lang.UnsupportedOperationException: Cannot build a Message with no content. (You never added any content to the message)

Root Cause Analysis

  1. java.lang.UnsupportedOperationException

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

    at net.dv8tion.jda.MessageBuilder.build()
  2. net.dv8tion.jda
    TextChannelImpl.sendMessage
    1. net.dv8tion.jda.MessageBuilder.build(MessageBuilder.java:173)
    2. net.dv8tion.jda.entities.impl.TextChannelImpl.sendMessage(TextChannelImpl.java:144)
    2 frames
  3. io.github.lxgaming
    MessageListener.onMessageReceived
    1. io.github.lxgaming.discordbot.commands.BotCommand.bot(BotCommand.java:11)
    2. io.github.lxgaming.discordbot.listeners.MessageListener.onMessageReceived(MessageListener.java:33)
    2 frames
  4. net.dv8tion.jda
    WebSocketClient.onTextMessage
    1. net.dv8tion.jda.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:176)
    2. net.dv8tion.jda.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:57)
    3. net.dv8tion.jda.handle.MessageReceivedHandler.handleInternally(MessageReceivedHandler.java:65)
    4. net.dv8tion.jda.handle.SocketHandler.handle(SocketHandler.java:36)
    5. net.dv8tion.jda.requests.WebSocketClient.handleEvent(WebSocketClient.java:545)
    6. net.dv8tion.jda.requests.WebSocketClient.onTextMessage(WebSocketClient.java:296)
    6 frames
  5. com.neovisionaries.ws
    ReadingThread.run
    1. com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
    2. com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:261)
    3. com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:239)
    4. com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:946)
    5. com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:729)
    6. com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:109)
    7. com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:65)
    7 frames