mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-12 21:30:10 +00:00
Compare commits
3 Commits
32af107699
...
8fd097836f
Author | SHA1 | Date | |
---|---|---|---|
8fd097836f | |||
5acee68987 | |||
25a1ca5a9f |
4
api.go
4
api.go
@ -2092,7 +2092,9 @@ func (app *appContext) ModifyConfig(gc *gin.Context) {
|
|||||||
if section == "email" && setting == "method" && value == "disabled" {
|
if section == "email" && setting == "method" && value == "disabled" {
|
||||||
value = ""
|
value = ""
|
||||||
}
|
}
|
||||||
if value.(string) != app.config.Section(section).Key(setting).MustString("") {
|
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("") {
|
||||||
tempConfig.Section(section).Key(setting).SetValue(value.(string))
|
tempConfig.Section(section).Key(setting).SetValue(value.(string))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@
|
|||||||
"description": "Displayed when a user creates an account"
|
"description": "Displayed when a user creates an account"
|
||||||
},
|
},
|
||||||
"url_base": {
|
"url_base": {
|
||||||
"name": "URL Base",
|
"name": "Reverse Proxy subfolder",
|
||||||
"required": false,
|
"required": false,
|
||||||
"requires_restart": true,
|
"requires_restart": true,
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -122,7 +122,6 @@ func (d *DiscordDaemon) ListRoles() (roles [][2]string, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, role := range r {
|
for _, role := range r {
|
||||||
fmt.Println(d.username)
|
|
||||||
if role.Name != d.username && role.Name != "@everyone" {
|
if role.Name != d.username && role.Name != "@everyone" {
|
||||||
roles = append(roles, [2]string{role.ID, role.Name})
|
roles = append(roles, [2]string{role.ID, role.Name})
|
||||||
}
|
}
|
||||||
@ -303,6 +302,13 @@ 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)
|
user := d.MustGetUser(channel.ID, m.Author.ID, m.Author.Discriminator, m.Author.Username)
|
||||||
d.users[m.Author.ID] = user
|
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.get("startMessage") + "\n"
|
||||||
content += d.app.storage.lang.Telegram[lang].Strings.template("languageMessage", tmpl{"command": "!lang"})
|
content += d.app.storage.lang.Telegram[lang].Strings.template("languageMessage", tmpl{"command": "!lang"})
|
||||||
_, err = s.ChannelMessageSend(channel.ID, content)
|
_, err = s.ChannelMessageSend(channel.ID, content)
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"matrixStartMessage": "Hi\nEnter the below PIN in the Jellyfin sign-up page to verify your account.",
|
"matrixStartMessage": "Hi\nEnter the below PIN in the Jellyfin sign-up page to verify your account.",
|
||||||
"invalidPIN": "That PIN was invalid, try again.",
|
"invalidPIN": "That PIN was invalid, try again.",
|
||||||
"pinSuccess": "Success! You can now return to the sign-up page.",
|
"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>."
|
"languageMessage": "Note: See available languages with {command}, and set language with {command} <language code>.",
|
||||||
|
"discordDMs": "Please check your DMs for a response."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user