Automatically add supporter role upon verification
This commit is contained in:
parent
719d41ed78
commit
fa88211b6b
@ -25,6 +25,7 @@ const (
|
||||
verifiedRole = "512044929195704330"
|
||||
editorRole = "141849207404363776"
|
||||
staffRole = "218221363918274560"
|
||||
supporterRole = "365719917426638848"
|
||||
)
|
||||
|
||||
// Verify verifies that the given user has an account on notify.moe.
|
||||
@ -95,6 +96,11 @@ func Verify(s *discordgo.Session, msg *discordgo.MessageCreate) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// Give supporter role
|
||||
if user.IsPro() {
|
||||
s.GuildMemberRoleAdd(guildID, msg.Author.ID, supporterRole)
|
||||
}
|
||||
|
||||
// Update notify.moe user account
|
||||
user.Accounts.Discord.Verified = true
|
||||
user.Save()
|
||||
|
Loading…
Reference in New Issue
Block a user