Updated for new loggy standards
This commit is contained in:
@ -55,7 +55,7 @@ func status(s *discordgo.Session) {
|
||||
}
|
||||
}
|
||||
statistics += "\n```"
|
||||
log.LogInfo(fmt.Sprintf("Private statistics: %+v", statistics))
|
||||
log.LogInfo("Private statistics: %+v", statistics)
|
||||
go runPurge(s)
|
||||
return
|
||||
}
|
||||
|
||||
10
main.go
10
main.go
@ -54,7 +54,7 @@ func main() {
|
||||
log.LogPanic("No token provided. Please run: disgord-thanos -t <bot token>")
|
||||
}
|
||||
|
||||
log.LogCritical(fmt.Sprintf("SetupToken: %+v\nRebootToken: %+v", setupToken, rebootToken))
|
||||
log.LogCritical("SetupToken: %+v\nRebootToken: %+v", setupToken, rebootToken)
|
||||
dg, err := discordgo.New("Bot " + token)
|
||||
if err != nil {
|
||||
log.LogErrorType(err)
|
||||
@ -295,7 +295,7 @@ func readReaction(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
||||
go storeVerification(verification)
|
||||
} else if m.Emoji.Name == "👶" {
|
||||
requestAge(s, user)
|
||||
log.LogInfo(fmt.Sprintf("%+v has requested ASL for user %+v.", admin.User.Username, user.Username))
|
||||
log.LogInfo("%+v has requested ASL for user %+v.", admin.User.Username, user.Username)
|
||||
return
|
||||
} else if m.Emoji.Name == "⛔" {
|
||||
s.GuildBanCreateWithReason(config.GuildID, user.ID, fmt.Sprintf("Underage or too many failed verifications. %+v", admin.User.Username), 5)
|
||||
@ -303,7 +303,7 @@ func readReaction(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
||||
} else {
|
||||
return
|
||||
}
|
||||
log.LogInfo(fmt.Sprintf("%+v", verification.prettyPrint()))
|
||||
log.LogInfo("%+v", verification.prettyPrint())
|
||||
delete(config.Verifications, m.MessageID)
|
||||
}
|
||||
func storeVerification(v Verification) {
|
||||
@ -322,13 +322,13 @@ func storeVerification(v Verification) {
|
||||
}
|
||||
resp, err := client.Get(v.Photo)
|
||||
if err != nil {
|
||||
log.LogError(fmt.Sprintf("Unable to download verification %s-%s-%s", v.UserID, v.Username, fileName))
|
||||
log.LogError("Unable to download verification %s-%s-%s", v.UserID, v.Username, fileName)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer file.Close()
|
||||
_, err = io.Copy(file, resp.Body)
|
||||
if err != nil {
|
||||
log.LogError(fmt.Sprintf("Unable to store verification %s-%s-%s", v.UserID, v.Username, fileName))
|
||||
log.LogError("Unable to store verification %s-%s-%s", v.UserID, v.Username, fileName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user