Class MessageCreateBuilder

All Implemented Interfaces:
MessageCreateRequest<MessageCreateBuilder>, MessageData, MessageRequest<MessageCreateBuilder>

Builder specialized for building a MessageCreateData.
This can be used to build a request and send it to various API endpoints.

Example


 try (FileUpload file = FileUpload.fromData(new File("wave.gif"))) {
     MessageCreateData data = new MessageCreateBuilder()
       .setContent("Hello guys!")
       .setTTS(true)
       .setFiles(file)
       .build();

     for (MessageChannel channel : channels) {
         channel.sendMessage(data).queue();
     }
 } // closes wave.gif if an error occurred
 
See Also: