public static MessageBuilder fromMessage ( Message message ) { MessageBuilder builder = new MessageBuilder ( ) ; builder . getStringBuilder ( ) . append ( message . getContent ( ) ) ; if ( ! message . getEmbeds ( ) . isEmpty ( ) ) { builder . setEmbed ( message . getEmbeds ( ) . get ( 0 ) . toBuilder ( ) ) ; } for ( MessageAttachment attachment : message . getAttachments ( ) ) { // Since spoiler status is encoded in the file name, it is copied automatically. builder . addAttachment ( attachment . getUrl ( ) ) ; } return builder ; }
Creates a message builder from a message .