package main import "fmt" import "time" import "reflect" type Config struct { GuildID string MonitorChan string VerifiedChan string AdminChan string MonitorRole string VerifiedRole string AdminRole string StartTime time.Time DiscordToken string MyEmail string EmailPass string SmtpServer string AuthServer string DbFile string WbFinished bool } type User struct { DiscordID string Email string McUser string LastSeen time.Time LastReported time.Time } func userGetField(u *User, field string) string { r := reflect.ValueOf(u) f := reflect.Indirect(r).FieldByName(field) return string(f.String()) } type Report struct { Time time.Time Reporter User Abuser User Msg string Target Target } type Target struct { Type string Place string } type Verification struct { Created time.Time DiscordID string Email Email SITNET string Code string } func (v Verification) sendEmail() { var e Email e.Recipients = append(e.Recipients, fmt.Sprintf("%+v@sunypoly.edu", v.SITNET)) e.Subject = "Minecraft Verification" e.Body = fmt.Sprintf("Hello!\n\nYou are getting this email because you joined the Minecraft Discord channel for SUNY Poly. If you would like to verify your account so that you can use our Discord server and play on the SUNY Poly Minecraft server, please private message the Minedall bot with the command !verify %+v [your case sensitive minecraft username here]. If you are having trouble with this action, please send a message in the \"unverified\" channel, and a moderator will assist you with the process. \n\nWe hope to see you soon in our server!\nCSNet Staff\nadmins@cs.sunyit.edu", v.Code) e.send() } type Email struct { Recipients []string Subject string Body string } type McAccount struct { id string name string } type McAccountArr []McAccount