From 74a8053e78adf53a2e55eaf61aa2fde50b9ff974 Mon Sep 17 00:00:00 2001 From: 7heMech <83923848+7heMech@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:04:38 +0300 Subject: [PATCH] Update welcomemessage.go Substitution for author fields --- bot/logic/welcomemessage.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bot/logic/welcomemessage.go b/bot/logic/welcomemessage.go index 959ce616..0eafd0da 100644 --- a/bot/logic/welcomemessage.go +++ b/bot/logic/welcomemessage.go @@ -596,9 +596,23 @@ func BuildCustomEmbed( } if customEmbed.AuthorName != nil { - e.SetAuthor(*customEmbed.AuthorName, utils.ValueOrZero(customEmbed.AuthorUrl), utils.ValueOrZero(customEmbed.AuthorIconUrl)) + authorName := DoPlaceholderSubstitutions(*customEmbed.AuthorName, ctx, ticket, additionalPlaceholders) + + authorUrl := ValueOrZero(customEmbed.AuthorUrl) + if authorUrl != "" { + authorUrl = DoPlaceholderSubstitutions(authorUrl, ctx, ticket, additionalPlaceholders) + } + + authorIconUrl := ValueOrZero(customEmbed.AuthorIconUrl) + if authorIconUrl != "" { + authorIconUrl = DoPlaceholderSubstitutions(authorIconUrl, ctx, ticket, additionalPlaceholders) + } + + e.SetAuthor(authorName, authorUrl, authorIconUrl) } + + for _, field := range fields { value := field.Value if ticket.Id != 0 {