diff --git a/main.go b/main.go index 279ffcf..bf3da11 100644 --- a/main.go +++ b/main.go @@ -163,12 +163,17 @@ func ready(s *discordgo.Session, event *discordgo.Ready) { s.UpdateStatus(0, "DreamDaddy v0.9") } -//func guildMemberRoleAdd(s *discordgo.Session, m *discordgo.GuildMemberRoleAdd) { -// defer log.PanicSafe() -// config.Unverified[m.User.ID] = time.Now() -// config.Probations[m.User.ID] = time.Now() -// saveConfig() -//} +func guildMemberUpdate(s *discordgo.Session, m *discordgo.GuildMemberUpdate) { + defer log.PanicSafe() + for role := range m.Roles { + if fmt.Sprintf("%+v", role) == config.MonitorRole { + config.Unverified[m.User.ID] = time.Now() + config.Probations[m.User.ID] = time.Now() + saveConfig() + } + } + +} func guildMemberAdd(s *discordgo.Session, m *discordgo.GuildMemberAdd) { defer log.PanicSafe()