From 2fa3be3a8b6d78c2269773f336df387cea004332 Mon Sep 17 00:00:00 2001 From: Arkitu Date: Mon, 19 Jan 2026 10:38:13 +0100 Subject: [PATCH] update sub title according to locale --- main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 14ff801..b04cc59 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,7 @@ var descs = map[string]*dg.ApplicationCommand{ }, // /!\ Make sure to update handler if other options are added // Guess options are added in init function - // It's assumed in handler that there aren't other options + // It is assumed in handler that there aren't other options Options: []*dg.ApplicationCommandOption{}, }, } @@ -157,12 +157,18 @@ var handlers = map[string]func(*dg.Session, *dg.InteractionCreate){ } else { cmdAuthor = i.User.DisplayName() } + var title string + if i.Locale == dg.French { + title = "Tentative par " + cmdAuthor + } else { + title = "Guess by " + cmdAuthor + } s.InteractionRespond(i.Interaction, &dg.InteractionResponse{ Type: dg.InteractionResponseChannelMessageWithSource, Data: &dg.InteractionResponseData{ Embeds: []*dg.MessageEmbed{ { - Title: "Guess by " + cmdAuthor, + Title: title, Description: strings.Join(guesses, "\n") + "\n\n**" + strconv.Itoa(green) + " 🟩**\n**" + strconv.Itoa(red) + " 🟥**", Color: stg.Color, },