Browse Source

Fix idFromUsername

master
Gregory Rudolph 4 years ago
parent
commit
304144c607
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 2
      auth.go
  2. 2
      commands.go

2
auth.go

@ -176,7 +176,7 @@ func idFromUsername(username string) string {
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 { for _, m := range g {
if strings.ToUpper(m.Nick) == strings.ToUpper(username) { if strings.ToUpper(m.User.Username) == 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)
} }

2
commands.go

@ -163,7 +163,7 @@ func RetrieveVerification(b BotCommand) bool {
log.LogErrorType(err) log.LogErrorType(err)
return false return false
} }
msg := fmt.Sprintf("```%+v\nJoined: %+v\n```", user.User.Username, user.JoinedAt) msg := fmt.Sprintf("``` %+v\nJoined: %+v\n```", user.User.Username, user.JoinedAt)
s.ChannelFileSendWithMessage(m.ChannelID, msg, matches[0], verificationImage) s.ChannelFileSendWithMessage(m.ChannelID, msg, matches[0], verificationImage)
return true return true
} }

Loading…
Cancel
Save