1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2025-01-06 08:20:11 +00:00

Compare commits

..

No commits in common. "8fd097836ff520018836f33f59c4c9c082b26bd8" and "32af107699e9ded9cc8db908c226a2294335d797" have entirely different histories.

4 changed files with 4 additions and 13 deletions

4
api.go
View File

@ -2092,9 +2092,7 @@ func (app *appContext) ModifyConfig(gc *gin.Context) {
if section == "email" && setting == "method" && value == "disabled" {
value = ""
}
if (section == "discord" || section == "matrix") && setting == "language" {
tempConfig.Section("telegram").Key("language").SetValue(value.(string))
} else if value.(string) != app.config.Section(section).Key(setting).MustString("") {
if value.(string) != app.config.Section(section).Key(setting).MustString("") {
tempConfig.Section(section).Key(setting).SetValue(value.(string))
}
}

View File

@ -250,7 +250,7 @@
"description": "Displayed when a user creates an account"
},
"url_base": {
"name": "Reverse Proxy subfolder",
"name": "URL Base",
"required": false,
"requires_restart": true,
"type": "text",

View File

@ -122,6 +122,7 @@ func (d *DiscordDaemon) ListRoles() (roles [][2]string, err error) {
return
}
for _, role := range r {
fmt.Println(d.username)
if role.Name != d.username && role.Name != "@everyone" {
roles = append(roles, [2]string{role.ID, role.Name})
}
@ -302,13 +303,6 @@ func (d *DiscordDaemon) commandStart(s *dg.Session, m *dg.MessageCreate, lang st
}
user := d.MustGetUser(channel.ID, m.Author.ID, m.Author.Discriminator, m.Author.Username)
d.users[m.Author.ID] = user
_, err = d.bot.ChannelMessageSendReply(m.ChannelID, d.app.storage.lang.Telegram[lang].Strings.get("discordDMs"), m.MessageReference)
if err != nil {
d.app.err.Printf("Discord: Failed to send reply to \"%s\": %v", m.Author.Username, err)
return
}
content := d.app.storage.lang.Telegram[lang].Strings.get("startMessage") + "\n"
content += d.app.storage.lang.Telegram[lang].Strings.template("languageMessage", tmpl{"command": "!lang"})
_, err = s.ChannelMessageSend(channel.ID, content)

View File

@ -7,7 +7,6 @@
"matrixStartMessage": "Hi\nEnter the below PIN in the Jellyfin sign-up page to verify your account.",
"invalidPIN": "That PIN was invalid, try again.",
"pinSuccess": "Success! You can now return to the sign-up page.",
"languageMessage": "Note: See available languages with {command}, and set language with {command} <language code>.",
"discordDMs": "Please check your DMs for a response."
"languageMessage": "Note: See available languages with {command}, and set language with {command} <language code>."
}
}