Check if they're not a hacker, further spacing

This commit is contained in:
Joseph Ferano 2022-03-28 12:38:41 +07:00
parent 9c9fce4f40
commit ef308bd3f5

View File

@ -335,6 +335,7 @@ Your NFT will be your In-Game Character that provides you with unique traits, an
type WhitelistResult =
| NotInGame
| NotAHacker
| NotEnoughGBT of currentAmount : int
| Granted of PlayerData
| AlreadyWhitelisted
@ -348,10 +349,14 @@ let tryGrantWhitelist (ctx : IDiscordContext) =
if Seq.contains role user.Roles then
return AlreadyWhitelisted
elif player.Active then
let hackerRole = ctx.GetGuild().GetRole(GuildEnvironment.roleHacker)
if Seq.contains hackerRole user.Roles then
if int player.Bank >= WhitelistPrice then
return Granted player
else
return NotEnoughGBT (int player.Bank)
else
return NotAHacker
else
return NotInGame
| None -> return NotInGame
@ -372,6 +377,14 @@ let handleGimmeWhitelist (ctx : IDiscordContext) =
let builder = DiscordFollowupMessageBuilder().AsEphemeral(true)
match! tryGrantWhitelist ctx with
| NotAHacker ->
builder.Content <- $"""
Woah slow down buddy… Youre not even a hacker yet!
To get Whitelisted you need to buy it with **$GBT** by playing the game.
Go to <#{GuildEnvironment.channelTraining}> NOW to finish training and become a **HACKER**!**
"""
| NotInGame ->
builder.Content <- $"""
Woah slow down buddy… Youre not even in the game yet!
@ -405,8 +418,7 @@ Oh no! You don't have enough **$GBT** to buy a WHITELIST spot!
Come back when you have `{WhitelistPrice - total}` more $GBT.
The quickest way to earn $GBT is to `/recruit`. You'll earn `{InviteRewardAmount} 💰 $GBT`
for every Degen you `/recruit`!
The quickest way to earn $GBT is to `/recruit`. You'll earn `{InviteRewardAmount} 💰 $GBT` for every Degen you `/recruit`!
"""
builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore
builder.AddEmbed(msgEmbed) |> ignore
@ -418,9 +430,7 @@ for every Degen you `/recruit`!
msgEmbed.Title <- "Buy Whitelist"
msgEmbed.Color <- DiscordColor.Green
msgEmbed.Description <- $"""
Look at you Degen, you played Big Brothers games and made it out alive!
Now you can use your $GBT to pay for one of our coveted Whitelist spots.
Look at you Degen, you played Big Brothers games and made it out alive! Now you can use your $GBT to pay for one of our coveted Whitelist spots.
Click buy now below and the role will be auto assigned to you.
"""
@ -436,6 +446,7 @@ let handleBuyWhitelist (ctx : IDiscordContext) =
let builder = DiscordFollowupMessageBuilder().AsEphemeral(true)
match! tryGrantWhitelist ctx with
| NotAHacker -> builder.Content <- $"You are somehow not a hacker anymore, what exactly are you doing?"
| NotInGame -> builder.Content <- $"You somehow have left the game, what exactly are you doing?"
| AlreadyWhitelisted ->
builder.Content <- $"""