More changes

This commit is contained in:
Joseph Ferano 2022-03-28 18:17:48 +07:00
parent 85ad842251
commit efb5680b73

View File

@ -376,7 +376,9 @@ Go to <#{GuildEnvironment.channelShelters}> NOW to get assigned a bunk, and **JO
""" """
let alreadyWhitelistedMsg = $""" let alreadyWhitelistedMsg = $"""
Youre **ALREADY** Whitelisted! Save some for other Degenz… **REMEMBER**, you can earn `{InviteRewardAmount} $GBT` 💰 for every Degen you `/recruit` into the game! Youre **ALREADY** Whitelisted! Save some for other Degenz
Remember, you can earn `{InviteRewardAmount} $GBT` 💰 for every Degen you `/recruit` into the game!
**Commands:** **Commands:**
`/recruit` - Invite Degenz into the server. `/recruit` - Invite Degenz into the server.
@ -402,8 +404,9 @@ let handleGimmeWhitelist (ctx : IDiscordContext) =
do! ctx.Respond(InteractionResponseType.DeferredChannelMessageWithSource, builder) do! ctx.Respond(InteractionResponseType.DeferredChannelMessageWithSource, builder)
let whitelistEmbed = DiscordEmbedBuilder() let whitelistEmbed = DiscordEmbedBuilder()
whitelistEmbed.ImageUrl <- "https://s7.gifyu.com/images/whitelist-item-mock-banner18.png"
whitelistEmbed.Title <- "1x Degenz Game Whitelist " whitelistEmbed.Title <- "1x Degenz Game Whitelist "
let includeInfo () =
whitelistEmbed.ImageUrl <- "https://s7.gifyu.com/images/whitelist-item-mock-banner18.png"
whitelistEmbed.AddField("Item", "1x Whitelist", true) |> ignore whitelistEmbed.AddField("Item", "1x Whitelist", true) |> ignore
whitelistEmbed.AddField("Available", "750", true) |> ignore whitelistEmbed.AddField("Available", "750", true) |> ignore
whitelistEmbed.AddField("Price 💰", $"{WhitelistPrice} $GBT", true) |> ignore whitelistEmbed.AddField("Price 💰", $"{WhitelistPrice} $GBT", true) |> ignore
@ -422,9 +425,11 @@ let handleGimmeWhitelist (ctx : IDiscordContext) =
whitelistEmbed.Color <- DiscordColor.Green whitelistEmbed.Color <- DiscordColor.Green
whitelistEmbed.Description <- alreadyWhitelistedMsg whitelistEmbed.Description <- alreadyWhitelistedMsg
| NotEnoughGBT total -> | NotEnoughGBT total ->
includeInfo()
builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore builder.AddComponents([ buyBtn ; recruitBtn ]) |> ignore
whitelistEmbed.Description <- notEnoughMoneyMsg total whitelistEmbed.Description <- notEnoughMoneyMsg total
| Granted _ -> | Granted _ ->
includeInfo()
whitelistEmbed.Color <- DiscordColor.Green whitelistEmbed.Color <- DiscordColor.Green
whitelistEmbed.Color <- DiscordColor.Green whitelistEmbed.Color <- DiscordColor.Green
builder.AddComponents([ buyActiveBtn ]) |> ignore builder.AddComponents([ buyActiveBtn ]) |> ignore
@ -434,12 +439,11 @@ let handleGimmeWhitelist (ctx : IDiscordContext) =
} :> Task } :> Task
let buyWhitelistMsg = $""" let buyWhitelistMsg = $"""
🎉 Congratulations youve been **WHITELISTED**! 🎉 Congratulations youve 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:** **Remember:**
Earn `100 $GBT` 💰 for every Degen you `/recruit` into the game! Earn `100 $GBT` 💰 for every Degen you recruit into the game!
Just type `/recruit` anywhere, or press the button below...
**Commands:** **Commands:**
`/recruit` - Invite Degenz into the server. `/recruit` - Invite Degenz into the server.
@ -463,10 +467,16 @@ Come hang with all the other VIP Degenz in the <#{GuildEnvironment.channelElite}
""" """
| NotEnoughGBT _ -> builder.Content <- $"You somehow do not have enough $GBT, what exactly are you doing?" | NotEnoughGBT _ -> builder.Content <- $"You somehow do not have enough $GBT, what exactly are you doing?"
| Granted player -> | Granted player ->
let embed = DiscordEmbedBuilder()
embed.Description <- buyWhitelistMsg
embed.Color <- DiscordColor.Green
let recruitBtn = DiscordButtonComponent(ButtonStyle.Danger, $"ShowRecruitmentEmbed", $"Recruit Now") :> DiscordComponent
builder.AddComponents ([ recruitBtn ]) |> ignore
let role = ctx.GetGuild().GetRole(GuildEnvironment.roleWhitelist) let role = ctx.GetGuild().GetRole(GuildEnvironment.roleWhitelist)
do! ctx.GetDiscordMember().GrantRoleAsync(role) do! ctx.GetDiscordMember().GrantRoleAsync(role)
let! _ = DbService.updatePlayerCurrency -WhitelistPrice player let! _ = DbService.updatePlayerCurrency -WhitelistPrice player
builder.Content <- buyWhitelistMsg builder.AddEmbed(embed) |> ignore
do! ctx.FollowUp(builder) do! ctx.FollowUp(builder)
} :> Task } :> Task