Discord: Add users via accounts tab
Doesn't require a PIN like Telegram, as we can access a list of guild users with the GuildMembers intent set. This has to be enabled under Bot > Priviliged Gateway intents on the developer portal.
This commit is contained in:
@@ -165,10 +165,12 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
|
||||
api.GET(p+"/telegram/pin", app.TelegramGetPin)
|
||||
api.GET(p+"/telegram/verified/:pin", app.TelegramVerified)
|
||||
api.POST(p+"/users/telegram", app.TelegramAddUser)
|
||||
}
|
||||
if discordEnabled || telegramEnabled {
|
||||
api.POST(p+"/users/contact", app.SetContactMethods)
|
||||
}
|
||||
if discordEnabled {
|
||||
api.GET(p+"/users/discord/:username", app.DiscordGetUsers)
|
||||
api.POST(p+"/users/discord", app.DiscordConnect)
|
||||
}
|
||||
if app.config.Section("ombi").Key("enabled").MustBool(false) {
|
||||
api.GET(p+"/ombi/users", app.OmbiUsers)
|
||||
api.POST(p+"/ombi/defaults", app.SetOmbiDefaults)
|
||||
|
||||
Reference in New Issue
Block a user