From 0676b6c41f2f0d0aa79a3398310cd25452b9b018 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sun, 23 May 2021 17:31:20 +0100 Subject: [PATCH] Discord: Display channel on account creation form --- discord.go | 1 + storage.go | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/discord.go b/discord.go index 63ecf6d..3e0b848 100644 --- a/discord.go +++ b/discord.go @@ -89,6 +89,7 @@ func (d *DiscordDaemon) run() { d.serverChannelName = guild.Name if channel := d.app.config.Section("discord").Key("channel").String(); channel != "" { d.channelName = channel + d.serverChannelName += "/" + channel } defer d.bot.Close() <-d.ShutdownChannel diff --git a/storage.go b/storage.go index bd1b569..c32fb75 100644 --- a/storage.go +++ b/storage.go @@ -105,23 +105,24 @@ type Invite struct { } type Lang struct { - AdminPath string - chosenAdminLang string - Admin adminLangs - AdminJSON map[string]string - FormPath string - chosenFormLang string - Form formLangs - PasswordResetPath string - chosenPWRLang string - PasswordReset pwrLangs - EmailPath string - chosenEmailLang string - Email emailLangs - CommonPath string - Common commonLangs - SetupPath string - Setup setupLangs + AdminPath string + chosenAdminLang string + Admin adminLangs + AdminJSON map[string]string + FormPath string + chosenFormLang string + Form formLangs + PasswordResetPath string + chosenPWRLang string + PasswordReset pwrLangs + EmailPath string + chosenEmailLang string + Email emailLangs + CommonPath string + Common commonLangs + SetupPath string + Setup setupLangs + // Telegram translations are also used for Discord bots (and likely future ones). chosenTelegramLang string TelegramPath string Telegram telegramLangs