cannot enter string in #setTitle
portalthree opened this issue · 3 comments
portalthree commented
WebhookEmbed embed = new WebhookEmbedBuilder()
.setThumbnailUrl(headURL)
.setColor(0x55e9e9)
.setTitle("This is a title")
.setDescription("This is a description")
.build();
returns the error:
Required type: EmbedTitle
Provided: String
Andre601 commented
Required type: Embed Title
The error tells you exactly what is wrong. It expects a specific type, in this case EmbedTitle
and you provide it with a String.
Setting a embed title in discord-webhooks isn't the same as setting one in JDA. Here you need to create a new instance of EmbedTitle to use.
portalthree commented
yep figured it out!
WebhookEmbed embed = new WebhookEmbedBuilder()
.setThumbnailUrl(headURL)
.setColor(0x55e9e9)
.setTitle(new WebhookEmbed.EmbedTitle("This is a title.",""))
.setDescription("This is a description")
.build();
id recommend adding documentation for it
MinnDevelopment commented
There is documentation for it: