diff --git a/Bot/InviteTracker.fs b/Bot/InviteTracker.fs index ac40656..762a293 100644 --- a/Bot/InviteTracker.fs +++ b/Bot/InviteTracker.fs @@ -316,6 +316,7 @@ let sendInitialEmbed (client : DiscordClient) = let embed = DiscordEmbedBuilder() embed.ImageUrl <- "https://s1.gifyu.com/images/whitelist-image-2.gif" embed.Title <- "Degenz Game" + embed.Color <- DiscordColor.White embed.Description <- """ Mint Date: **April 2022** Supply: **3,333** @@ -362,83 +363,88 @@ let tryGrantWhitelist (ctx : IDiscordContext) = | None -> return NotInGame } +let notAHackerMsg = $""" +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**!** +""" + +let notInGameMsg = $""" +Woah slow down buddy… You’re not even in the game yet! To get Whitelisted you need to buy it with **$GBT** by playing the game. + +Go to <#{GuildEnvironment.channelShelters}> NOW to get assigned a bunk, and **JOIN THE GAME!** +""" + +let alreadyWhitelistedMsg = $""" +✅ You’re **ALREADY** Whitelisted! Save some for other Degenz… **REMEMBER**, you can earn `{InviteRewardAmount} $GBT` 💰 for every Degen you `/recruit` into the game! + +**Commands:** +`/recruit` - Invite Degenz into the server. +`/recruited` - Check how many Degenz you’ve invited. +""" + +let notEnoughMoneyMsg total = $""" +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`! +‎ +""" + +let canBuyWhitelistMsg = $""" +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. + +Click buy now below and the role will be auto assigned to you. +""" + let handleGimmeWhitelist (ctx : IDiscordContext) = task { let builder = DiscordInteractionResponseBuilder().AsEphemeral(true) do! ctx.Respond(InteractionResponseType.DeferredChannelMessageWithSource, builder) let whitelistEmbed = DiscordEmbedBuilder() - let thumb = DiscordEmbedBuilder.EmbedThumbnail() - thumb.Url <- "https://s7.gifyu.com/images/Card-5x-rotate.png" - whitelistEmbed.Thumbnail <- thumb + whitelistEmbed.ImageUrl <- "https://s7.gifyu.com/images/whitelist-item-mock-banner18.png" whitelistEmbed.Title <- "1x Degenz Game Whitelist ‎" - whitelistEmbed.AddField("Mint Date", "April 2022", true) |> ignore + whitelistEmbed.AddField("Item", "1x Whitelist", true) |> ignore + whitelistEmbed.AddField("Available", "750", true) |> ignore whitelistEmbed.AddField("Price 💰", $"{WhitelistPrice} $GBT", true) |> ignore - whitelistEmbed.AddField("Where?", "Join us on the Moon", true) |> ignore + whitelistEmbed.Color <- DiscordColor.Red + let buyBtn = DiscordButtonComponent(ButtonStyle.Success, $"BuyWhitelist", $"Buy Now", true) :> DiscordComponent + let buyActiveBtn = DiscordButtonComponent(ButtonStyle.Success, $"BuyWhitelist", $"Buy Now") :> DiscordComponent + let recruitBtn = DiscordButtonComponent(ButtonStyle.Danger, $"ShowRecruitmentEmbed", $"Recruit Now") :> DiscordComponent let builder = DiscordFollowupMessageBuilder().AsEphemeral(true) 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 -> - builder.Content <- $""" -Woah slow down buddy… You’re not even in the game yet! - -To get Whitelisted you need to buy it with **$GBT** by playing the game. - -Go to <#{GuildEnvironment.channelShelters}> NOW to get assigned a private bunk, and **JOIN THE GAME!** -""" + | NotAHacker -> whitelistEmbed.Description <- notAHackerMsg + | NotInGame -> whitelistEmbed.Description <- notInGameMsg | AlreadyWhitelisted -> - let buyBtn = DiscordButtonComponent(ButtonStyle.Success, $"BuyWhitelist", $"Buy Now", true) :> DiscordComponent - let recruitBtn = DiscordButtonComponent(ButtonStyle.Danger, $"ShowRecruitmentEmbed", $"Recruit Now") :> DiscordComponent + builder.AddComponents([ recruitBtn ]) |> ignore + whitelistEmbed.Color <- DiscordColor.Green + whitelistEmbed.Color <- DiscordColor.Green + whitelistEmbed.Description <- alreadyWhitelistedMsg + | NotEnoughGBT total -> builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore - builder.Content <- $""" -✅ You’re **ALREADY** Whitelisted! Save some for other Degenz… + whitelistEmbed.Description <- notEnoughMoneyMsg total + | Granted _ -> + whitelistEmbed.Color <- DiscordColor.Green + whitelistEmbed.Color <- DiscordColor.Green + builder.AddComponents([ buyActiveBtn ]) |> ignore + whitelistEmbed.Description <- canBuyWhitelistMsg + builder.AddEmbed(whitelistEmbed) |> ignore + do! ctx.FollowUp(builder) + } :> Task + +let buyWhitelistMsg = $""" +🎉 Congratulations you’ve been **WHITELISTED**! +Now type `/recruit` and share **YOUR UNIQUE LINK** with any Degenz +you want to invite into the game, and let them earn whitelist too! **Remember:** -Earn `{InviteRewardAmount} $GBT` 💰 for every Degen you `/recruit` into the game! +Earn `100 $GBT` 💰 for every Degen you `/recruit` into the game! **Commands:** `/recruit` - Invite Degenz into the server. `/recruited` - Check how many Degenz you’ve invited. """ - | NotEnoughGBT total -> - whitelistEmbed.Color <- DiscordColor.Red - let buyBtn = DiscordButtonComponent(ButtonStyle.Success, $"BuyWhitelist", $"Buy Now", true) :> DiscordComponent - let recruitBtn = DiscordButtonComponent(ButtonStyle.Danger, $"ShowRecruitmentEmbed", $"Recruit Now") :> DiscordComponent - let msgEmbed = DiscordEmbedBuilder() - msgEmbed.Color <- DiscordColor.Red - msgEmbed.Description <- $""" -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`! -""" - builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore - builder.AddEmbed(msgEmbed) |> ignore - builder.AddEmbed(whitelistEmbed) |> ignore - | Granted _ -> - whitelistEmbed.Color <- DiscordColor.Green - builder.AddComponents([ DiscordButtonComponent(ButtonStyle.Success, $"BuyWhitelist", $"Buy Now") :> DiscordComponent ]) |> ignore - let msgEmbed = DiscordEmbedBuilder() - msgEmbed.Title <- "Buy Whitelist" - msgEmbed.Color <- DiscordColor.Green - msgEmbed.Description <- $""" -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. - -Click buy now below and the role will be auto assigned to you. -""" - builder.AddEmbed(msgEmbed) |> ignore - builder.AddEmbed(whitelistEmbed) |> ignore - do! ctx.FollowUp(builder) - } :> Task let handleBuyWhitelist (ctx : IDiscordContext) = task { @@ -460,18 +466,7 @@ Come hang with all the other VIP Degenz in the <#{GuildEnvironment.channelElite} let role = ctx.GetGuild().GetRole(GuildEnvironment.roleWhitelist) do! ctx.GetDiscordMember().GrantRoleAsync(role) let! _ = DbService.updatePlayerCurrency -WhitelistPrice player - builder.Content <- $""" -🎉 Congratulations you’ve been **WHITELISTED**! -Now type `/recruit` and share **YOUR UNIQUE LINK** with any Degenz -you want to invite into the game, and let them earn whitelist too! - -**Remember:** -Earn `100 $GBT` 💰 for every Degen you `/recruit` into the game! - -**Commands:** -`/recruit` - Invite Degenz into the server. -`/recruited` - Check how many Degenz you’ve invited. -""" + builder.Content <- buyWhitelistMsg do! ctx.FollowUp(builder) } :> Task