create embeds jda discord

Solutions on MaxInterview for create embeds jda discord by the best coders in the world

showing results for - "create embeds jda discord"
Alessandro
19 Jul 2020
1// Create the EmbedBuilder instance
2EmbedBuilder eb = new EmbedBuilder();
3
4/*
5    Set the title:
6    1. Arg: title as string
7    2. Arg: URL as string or could also be null
8 */
9eb.setTitle("Title", null);
10
11/*
12    Set the color
13 */
14eb.setColor(Color.red);
15eb.setColor(new Color(0xF40C0C));
16eb.setColor(new Color(255, 0, 54));
17
18/*
19    Set the text of the Embed:
20    Arg: text as string
21 */
22eb.setDescription("Text");
23
24/*
25    Add fields to embed:
26    1. Arg: title as string
27    2. Arg: text as string
28    3. Arg: inline mode true / false
29 */
30eb.addField("Title of field", "test of field", false);
31
32/*
33    Add spacer like field
34    Arg: inline mode true / false
35 */
36eb.addBlankField(false);
37
38/*
39    Add embed author:
40    1. Arg: name as string
41    2. Arg: url as string (can be null)
42    3. Arg: icon url as string (can be null)
43 */
44eb.setAuthor("name", null, "https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/zekroBot_Logo_-_round_small.png");
45
46/*
47    Set footer:
48    1. Arg: text as string
49    2. icon url as string (can be null)
50 */
51eb.setFooter("Text", "https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/zekroBot_Logo_-_round_small.png");
52
53/*
54    Set image:
55    Arg: image url as string
56 */
57eb.setImage("https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/logo%20-%20title.png");
58
59/*
60    Set thumbnail image:
61    Arg: image url as string
62 */
63eb.setThumbnail("https://github.com/zekroTJA/DiscordBot/blob/master/.websrc/logo%20-%20title.png");
similar questions
discord jda