|
|
@ -19,10 +19,10 @@ func reqPass(w http.ResponseWriter, r *http.Request) { |
|
|
|
if &dg == nil { |
|
|
|
if &dg == nil { |
|
|
|
log.LogError("Discord session was nill.") |
|
|
|
log.LogError("Discord session was nill.") |
|
|
|
} |
|
|
|
} |
|
|
|
g, err := dg.Guild(config.GuildID) |
|
|
|
g, err := dg.GuildMembers(config.GuildID, "", "") |
|
|
|
log.LogInfo("reqPass guild is %+v.", config.GuildID) |
|
|
|
log.LogInfo("reqPass guild is %+v.", config.GuildID) |
|
|
|
if err == nil { |
|
|
|
if err == nil { |
|
|
|
for _, m := range g.Members { |
|
|
|
for _, m := range g { |
|
|
|
if strings.ToUpper(m.Nick) == strings.ToUpper(username) { |
|
|
|
if strings.ToUpper(m.Nick) == strings.ToUpper(username) { |
|
|
|
userID = m.User.ID |
|
|
|
userID = m.User.ID |
|
|
|
log.LogInfo("User ID found for %+v as %+v", username, userID) |
|
|
|
log.LogInfo("User ID found for %+v as %+v", username, userID) |
|
|
|