Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

create embeds jda discord

// Create the EmbedBuilder instance
EmbedBuilder eb = new EmbedBuilder();

/*
    Set the title:
    1. Arg: title as string
    2. Arg: URL as string or could also be null
 */
eb.setTitle("Title", null);

/*
    Set the color
 */
eb.setColor(Color.red);
eb.setColor(new Color(0xF40C0C));
eb.setColor(new Color(255, 0, 54));

/*
    Set the text of the Embed:
    Arg: text as string
 */
eb.setDescription("Text");

/*
    Add fields to embed:
    1. Arg: title as string
    2. Arg: text as string
    3. Arg: inline mode true / false
 */
eb.addField("Title of field", "test of field", false);

/*
    Add spacer like field
    Arg: inline mode true / false
 */
eb.addBlankField(false);

/*
    Add embed author:
    1. Arg: name as string
    2. Arg: url as string (can be null)
    3. Arg: icon url as string (can be null)
 */
eb.setAuthor("name", null, "https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/zekroBot_Logo_-_round_small.png");

/*
    Set footer:
    1. Arg: text as string
    2. icon url as string (can be null)
 */
eb.setFooter("Text", "https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/zekroBot_Logo_-_round_small.png");

/*
    Set image:
    Arg: image url as string
 */
eb.setImage("https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/logo%20-%20title.png");

/*
    Set thumbnail image:
    Arg: image url as string
 */
eb.setThumbnail("https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/logo%20-%20title.png");
Comment

PREVIOUS NEXT
Code Example
Java :: java stream filter 
Java :: spring boot jpa in clause 
Java :: How to convert timestamp to time in java 
Java :: android studio close app 
Java :: java string format 2 decimal places 
Java :: duplicate local variable in java 
Java :: what is final in java 
Java :: how to create a random number in java 
Java :: how to split a string in java 
Java :: How to determine if a given binary tree is a binary search tree, in Java? 
Java :: calculate mean from arraylist jaca 
Java :: jave arrayList to Array 
Java :: java string swap two characters 
Java :: console printing in java 
Java :: fibonacci in java 
Java :: java init arraylist string 
Java :: how to print array 
Java :: java run system command 
Java :: java while schleife 
Java :: java calculate time difference 
Java :: java string split from input string 
Java :: @notblank not working in spring boot 
Java :: Calculator Program in Java. 
Java :: collections.reverseorder() in java 
Java :: android studio Clearing shared preferences; 
Java :: android time 
Java :: Diamond pattern program in java 
Java :: java string to decimal 
Java :: slice a list java 
Java :: How to remove backstack fragment 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =