fix(command): bad display for no default channel
This commit is contained in:
parent
347d5b8267
commit
75ca960199
1 changed files with 7 additions and 1 deletions
|
@ -38,6 +38,12 @@ func ConfigShow(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||||
if len(chans) == 0 {
|
if len(chans) == 0 {
|
||||||
chans = "Aucun salon désactivé :)"
|
chans = "Aucun salon désactivé :)"
|
||||||
}
|
}
|
||||||
|
var defaultChan string
|
||||||
|
if len(cfg.FallbackChannel) == 0 {
|
||||||
|
defaultChan = "Pas de valeur"
|
||||||
|
} else {
|
||||||
|
defaultChan = fmt.Sprintf("<#%s>", cfg.FallbackChannel)
|
||||||
|
}
|
||||||
err := resp.Embeds([]*discordgo.MessageEmbed{
|
err := resp.Embeds([]*discordgo.MessageEmbed{
|
||||||
{
|
{
|
||||||
Type: discordgo.EmbedTypeRich,
|
Type: discordgo.EmbedTypeRich,
|
||||||
|
@ -46,7 +52,7 @@ func ConfigShow(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||||
Fields: []*discordgo.MessageEmbedField{
|
Fields: []*discordgo.MessageEmbedField{
|
||||||
{
|
{
|
||||||
Name: "Salons par défaut",
|
Name: "Salons par défaut",
|
||||||
Value: fmt.Sprintf("<#%s>", cfg.FallbackChannel),
|
Value: defaultChan,
|
||||||
Inline: false,
|
Inline: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue