Class MessagePollData

java.lang.Object
net.dv8tion.jda.api.utils.messages.MessagePollData
All Implemented Interfaces:
SerializableData

public class MessagePollData extends Object implements SerializableData
A poll that can be attached to a MessageCreateRequest.

Example


 channel.sendMessage("Hello guys! Check my poll:")
   .setPoll(
     MessagePollData.builder("Which programming language is better?")
       .addAnswer("Java", Emoji.fromFormatted("<:java:1006323566314274856>"))
       .addAnswer("Kotlin", Emoji.fromFormatted("<:kotlin:295940257797636096>"))
       .build())
   .queue()
 
See Also: