Fix a few text bugs and send message to HoP when buying whitelist

This commit is contained in:
Joseph Ferano 2022-03-28 23:17:56 +07:00
parent f682062e9f
commit 08474d91ef
2 changed files with 12 additions and 3 deletions

View File

@ -83,7 +83,7 @@ let defend (ctx : IDiscordContext) =
let handleDefenseMsg hackId = {
ButtonId = "Trainer-3"
ButtonText = "Got it"
ButtonText = "Next"
Message = $"🎉 Congratulations you successfully defended my {hackId} hack!\n\n"
+ "Shields only protect you for a LIMITED TIME, so remember to keep them mounted at all times, or risk getting hacked!"
}

View File

@ -202,7 +202,7 @@ let private showInviteMessage (ctx : IDiscordContext) =
do! sendFollowUpMessage ctx $"""
⚠️ Only Degen Hackers can `/recuit` others to the Degenz Army.
You must **COMPLETE YOUR TRAINING FIRST!** Then you can `/recruit`...
Go to {GuildEnvironment.channelTraining} now to become a **HACKER**!
Go to <#{GuildEnvironment.channelTraining}> now to become a **HACKER**!
"""
| None ->
do! sendFollowUpMessage ctx $"You're not in the game! Go to <#{GuildEnvironment.channelShelters}> NOW to get assigned a private bunk, and **JOIN THE GAME!**"
@ -331,7 +331,7 @@ Your NFT will be your In-Game Character that provides you with unique traits, an
|> Async.AwaitTask
|> Async.Ignore
with e ->
printfn $"Error trying to get channel {GuildEnvironment.channelTraining}\n\n{e.Message}"
printfn $"Error trying to get channel Training Dojo\n\n{e.Message}"
} |> Async.RunSynchronously
type WhitelistResult =
@ -478,6 +478,15 @@ let handleBuyWhitelist (ctx : IDiscordContext) =
do! ctx.GetDiscordMember().GrantRoleAsync(role)
let! _ = DbService.updatePlayerCurrency -WhitelistPrice player
builder.AddEmbed(embed) |> ignore
// Send message to hall of privacy
let builder = DiscordMessageBuilder()
builder.WithContent($"{player.Name} just purchased WHITELIST!") |> ignore
let channel = ctx.GetGuild().GetChannel(GuildEnvironment.channelEventsHackerBattle)
do! channel.SendMessageAsync(builder)
|> Async.AwaitTask
|> Async.Ignore
do! ctx.FollowUp(builder)
} :> Task