Check if they're not a hacker, further spacing
This commit is contained in:
parent
9c9fce4f40
commit
ef308bd3f5
@ -335,6 +335,7 @@ Your NFT will be your In-Game Character that provides you with unique traits, an
|
|||||||
|
|
||||||
type WhitelistResult =
|
type WhitelistResult =
|
||||||
| NotInGame
|
| NotInGame
|
||||||
|
| NotAHacker
|
||||||
| NotEnoughGBT of currentAmount : int
|
| NotEnoughGBT of currentAmount : int
|
||||||
| Granted of PlayerData
|
| Granted of PlayerData
|
||||||
| AlreadyWhitelisted
|
| AlreadyWhitelisted
|
||||||
@ -348,10 +349,14 @@ let tryGrantWhitelist (ctx : IDiscordContext) =
|
|||||||
if Seq.contains role user.Roles then
|
if Seq.contains role user.Roles then
|
||||||
return AlreadyWhitelisted
|
return AlreadyWhitelisted
|
||||||
elif player.Active then
|
elif player.Active then
|
||||||
if int player.Bank >= WhitelistPrice then
|
let hackerRole = ctx.GetGuild().GetRole(GuildEnvironment.roleHacker)
|
||||||
return Granted player
|
if Seq.contains hackerRole user.Roles then
|
||||||
|
if int player.Bank >= WhitelistPrice then
|
||||||
|
return Granted player
|
||||||
|
else
|
||||||
|
return NotEnoughGBT (int player.Bank)
|
||||||
else
|
else
|
||||||
return NotEnoughGBT (int player.Bank)
|
return NotAHacker
|
||||||
else
|
else
|
||||||
return NotInGame
|
return NotInGame
|
||||||
| None -> return NotInGame
|
| None -> return NotInGame
|
||||||
@ -366,12 +371,20 @@ let handleGimmeWhitelist (ctx : IDiscordContext) =
|
|||||||
let thumb = DiscordEmbedBuilder.EmbedThumbnail()
|
let thumb = DiscordEmbedBuilder.EmbedThumbnail()
|
||||||
thumb.Url <- "https://s7.gifyu.com/images/Card-5x-rotate.png"
|
thumb.Url <- "https://s7.gifyu.com/images/Card-5x-rotate.png"
|
||||||
whitelistEmbed.Thumbnail <- thumb
|
whitelistEmbed.Thumbnail <- thumb
|
||||||
whitelistEmbed.Title <- "1x Degenz Game Whitelist "
|
whitelistEmbed.Title <- "1x Degenz Game Whitelist "
|
||||||
whitelistEmbed.AddField("Mint April 2022", "Join us on the moon", true) |> ignore
|
whitelistEmbed.AddField("Mint April 2022", "Join us on the moon", true) |> ignore
|
||||||
whitelistEmbed.AddField("Price 💰", $"{WhitelistPrice} $GBT", true) |> ignore
|
whitelistEmbed.AddField("Price 💰", $"{WhitelistPrice} $GBT", true) |> ignore
|
||||||
|
|
||||||
let builder = DiscordFollowupMessageBuilder().AsEphemeral(true)
|
let builder = DiscordFollowupMessageBuilder().AsEphemeral(true)
|
||||||
match! tryGrantWhitelist ctx with
|
match! tryGrantWhitelist ctx with
|
||||||
|
| NotAHacker ->
|
||||||
|
builder.Content <- $"""
|
||||||
|
Woah slow down buddy… You’re 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 ->
|
| NotInGame ->
|
||||||
builder.Content <- $"""
|
builder.Content <- $"""
|
||||||
Woah slow down buddy… You’re not even in the game yet!
|
Woah slow down buddy… You’re 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.
|
Come back when you have `{WhitelistPrice - total}` more $GBT.
|
||||||
|
|
||||||
The quickest way to earn $GBT is to `/recruit`. You'll earn `{InviteRewardAmount} 💰 $GBT`
|
The quickest way to earn $GBT is to `/recruit`. You'll earn `{InviteRewardAmount} 💰 $GBT` for every Degen you `/recruit`!
|
||||||
for every Degen you `/recruit`!
|
|
||||||
"""
|
"""
|
||||||
builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore
|
builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore
|
||||||
builder.AddEmbed(msgEmbed) |> ignore
|
builder.AddEmbed(msgEmbed) |> ignore
|
||||||
@ -418,9 +430,7 @@ for every Degen you `/recruit`!
|
|||||||
msgEmbed.Title <- "Buy Whitelist"
|
msgEmbed.Title <- "Buy Whitelist"
|
||||||
msgEmbed.Color <- DiscordColor.Green
|
msgEmbed.Color <- DiscordColor.Green
|
||||||
msgEmbed.Description <- $"""
|
msgEmbed.Description <- $"""
|
||||||
Look at you Degen, you played Big Brother’s games and made it out alive!
|
Look at you Degen, you played Big Brother’s games and made it out alive! Now you can use your $GBT to pay for one of our coveted Whitelist spots.
|
||||||
|
|
||||||
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.
|
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)
|
let builder = DiscordFollowupMessageBuilder().AsEphemeral(true)
|
||||||
match! tryGrantWhitelist ctx with
|
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?"
|
| NotInGame -> builder.Content <- $"You somehow have left the game, what exactly are you doing?"
|
||||||
| AlreadyWhitelisted ->
|
| AlreadyWhitelisted ->
|
||||||
builder.Content <- $"""
|
builder.Content <- $"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user