diff --git a/Bot/GuildEnvironment.fs b/Bot/GuildEnvironment.fs index 760f720..d845e5e 100644 --- a/Bot/GuildEnvironment.fs +++ b/Bot/GuildEnvironment.fs @@ -54,6 +54,7 @@ let roleTrainee = getId "ROLE_TRAINEE" let roleHacker = getId "ROLE_HACKER" let rolePrisoner = getId "ROLE_PRISONER" let roleWhitelist = getId "ROLE_WHITELIST" +let roleWhiteOG = getId "ROLE_WHITEOG" let roleAdmin = getId "ROLE_ADMIN" let mutable botClientRecruit : DiscordClient option = None let mutable botClientHacker : DiscordClient option = None diff --git a/Bot/Whitelist.fs b/Bot/Whitelist.fs index f253bee..c2049de 100644 --- a/Bot/Whitelist.fs +++ b/Bot/Whitelist.fs @@ -42,9 +42,10 @@ You need to **BUY** Whitelist with 💰 $GBT... printfn $"Error trying to get channel Whitelist\n\n{e.Message}" } |> Async.RunSynchronously -let grantWhitelistRole (ctx : IDiscordContext) = +let grantWhitelistRole isOg (ctx : IDiscordContext) = task { - let role = ctx.GetGuild().GetRole(GuildEnvironment.roleWhitelist) + let roleId = if isOg then GuildEnvironment.roleWhiteOG else GuildEnvironment.roleWhitelist + let role = ctx.GetGuild().GetRole(roleId) do! ctx.GetDiscordMember().GrantRoleAsync(role) } :> Task @@ -57,7 +58,7 @@ let handleButtonEvent _ (event : ComponentInteractionCreateEventArgs) = let id = ctx.GetInteractionId() let itemId = id.Split("-").[1] do! Store.handleBuyItem ctx itemId - do! grantWhitelistRole ctx + do! grantWhitelistRole (itemId = "WHITEOG") ctx } :> Task | id when id.StartsWith("CreateGuildInvite") -> InviteTracker.handleCreateInvite ctx | id when id.StartsWith("ShowRecruited") -> InviteTracker.getInvitedUsersForId (ctx.GetDiscordMember()) ctx