Follow up

This commit is contained in:
Joseph Ferano 2022-05-19 01:19:05 +07:00
parent 202905d9f9
commit e84d77a559

View File

@ -454,7 +454,6 @@ let handleGuildMemberAdded _ (eventArgs : GuildMemberAddEventArgs) =
let submitWhitelist (address : string) (ctx : IDiscordContext) =
PlayerInteractions.executePlayerAction ctx (fun player -> async {
// BtshZ7oNB5tk5pVbDpsRCziZ1qwV7SMCJq1Pe3YbHZuo
let pubkey = PublicKey(address)
try
if pubkey.IsValid() && pubkey.IsOnCurve() then
@ -465,7 +464,7 @@ let submitWhitelist (address : string) (ctx : IDiscordContext) =
| Some _ -> "We successfully updated your wallet address:"
| None -> "We have successfully received your wallet address"
do! addWalletAddress (ctx.GetDiscordMember().Id) address
do! Messaging.sendSimpleResponse ctx $"""
do! Messaging.sendFollowUpMessage ctx $"""
{msg} {address}
Keep an eye on <#{GuildEnvironment.channelAnnouncements}> for updates.
@ -479,10 +478,10 @@ Keep an eye on <#{GuildEnvironment.channelAnnouncements}> for updates.
|> Async.Ignore
do! Analytics.walletSubmit (ctx.GetDiscordMember())
else
do! Messaging.sendSimpleResponse ctx "⚠️ That's not a valid Solana address, please try again"
do! Messaging.sendFollowUpMessage ctx "⚠️ That's not a valid Solana address, please try again"
do! Analytics.invalidWalletSubmit (ctx.GetDiscordMember())
with _ ->
do! Messaging.sendSimpleResponse ctx "⚠️ That's not a valid Solana address, please try again"
do! Messaging.sendFollowUpMessage ctx "⚠️ That's not a valid Solana address, please try again"
do! Analytics.invalidWalletSubmit (ctx.GetDiscordMember())
})