diff --git a/config.go b/config.go index 9f3ed2d..1b04f1d 100644 --- a/config.go +++ b/config.go @@ -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 } diff --git a/main.go b/main.go index 9bb260f..65f19af 100644 --- a/main.go +++ b/main.go @@ -54,7 +54,7 @@ func main() { log.LogPanic("No token provided. Please run: disgord-thanos -t ") } - 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) } }