Skip to content

Commit

Permalink
Add missing avatar and username properties to `WebhookMessageCreateBu…
Browse files Browse the repository at this point in the history
…ilder` (#376)

* Add missing avatar and username to `WebhookMessageCreateBuilder`

* Remove unused import
  • Loading branch information
PotatoPresident authored Aug 28, 2021
1 parent 67637c5 commit d8134f3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class WebhookMessageCreateBuilder

override var content: String? = null

var username: String? = null

var avatarUrl: String? = null

override var tts: Boolean? = null

override val embeds: MutableList<EmbedBuilder> = mutableListOf()
Expand All @@ -35,6 +39,8 @@ class WebhookMessageCreateBuilder
return MultiPartWebhookExecuteRequest(
WebhookExecuteRequest(
content = Optional(content).coerceToMissing(),
username = Optional(username).coerceToMissing(),
avatar = Optional(avatarUrl).coerceToMissing(),
tts = Optional(tts).coerceToMissing().toPrimitive(),
embeds = Optional(embeds).mapList { it.toRequest() },
allowedMentions = Optional(allowedMentions).coerceToMissing().map { it.build() },
Expand Down

0 comments on commit d8134f3

Please sign in to comment.