discord: add/move to slash commands

the version of the discord library with support for this isn't
necessarily stable, so normal ! commands will still be available. The
user is no longer DMed for the PIN, instead they type /pin <PIN>.
This commit is contained in:
Harvey Tindall
2022-01-26 21:47:02 +00:00
parent e66241ddcb
commit 15e5564b12
8 changed files with 244 additions and 41 deletions
+1 -1
View File
@@ -504,7 +504,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
data["discordUsername"] = app.discord.username
data["discordRequired"] = app.config.Section("discord").Key("required").MustBool(false)
data["discordSendPINMessage"] = template.HTML(app.storage.lang.Form[lang].Strings.template("sendPINDiscord", tmpl{
"command": `<code class="code">` + app.config.Section("discord").Key("start_command").MustString("!start") + `</code>`,
"command": `<code class="code">/` + app.config.Section("discord").Key("start_command").MustString("start") + `</code>`,
"server_channel": app.discord.serverChannelName,
}))
data["discordServerName"] = app.discord.serverName