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, },