From fa88211b6ba240b5729e54d6c2df848c6d7cf2f2 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 14 Nov 2018 10:50:55 +0900 Subject: [PATCH] Automatically add supporter role upon verification --- bots/discord/commands/Verify.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bots/discord/commands/Verify.go b/bots/discord/commands/Verify.go index d50cdf7e..e4d1d5b5 100644 --- a/bots/discord/commands/Verify.go +++ b/bots/discord/commands/Verify.go @@ -22,9 +22,10 @@ var regions = map[string]string{ } const ( - verifiedRole = "512044929195704330" - editorRole = "141849207404363776" - staffRole = "218221363918274560" + 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()