diff --git a/Bot/InviteTracker.fs b/Bot/InviteTracker.fs index 57adb67..8e2660e 100644 --- a/Bot/InviteTracker.fs +++ b/Bot/InviteTracker.fs @@ -395,7 +395,7 @@ let showWalletStatus (ctx : IDiscordContext) = do! Messaging.sendFollowUpMessage ctx "Something went wrong retrieving your wallet address" }) -let sendSubmitEmbed (ctx : IDiscordContext) = +let sendSubmitEmbed (_ : IDiscordContext) = async { try let rewardMsg = $""" @@ -538,6 +538,17 @@ Keep an eye on <#{GuildEnvironment.channelAnnouncements}> for updates.""" do! Analytics.invalidWalletSubmit (ctx.GetDiscordMember()) }) +let tooLateToSendAddress (address : string) (ctx : IDiscordContext) = + PlayerInteractions.executePlayerAction ctx (fun player -> async { + + do! Messaging.sendFollowUpMessage ctx $""" +🚀 __Mint Date:__ June 20th 6:30 UTC +❌ Wallet Submissions have closed - {address} + +Keep an eye on <#{GuildEnvironment.channelAnnouncements}> for updates.""" + + }) + type Inviter() = inherit ApplicationCommandModule () @@ -552,15 +563,15 @@ type Inviter() = [] member this.SubmitAddress (ctx : InteractionContext, [] address : string) = - let isWhitelist (role : DiscordRole) = - role.Id = GuildEnvironment.roleWhitelistPending || role.Id = GuildEnvironment.roleWhiteOGPending || - role.Id = GuildEnvironment.roleWhitelist || role.Id = GuildEnvironment.roleWhiteOG - if ctx.Member.Roles |> Seq.exists isWhitelist then - enforceChannel (DiscordInteractionContext ctx) (submitAddress address) - else - let msg = $"You currently are not Whitelisted, go to <#{GuildEnvironment.channelWhitelist}> to purchase the role!" - Messaging.sendSimpleResponse (DiscordInteractionContext ctx) msg - |> Async.StartAsTask :> Task + enforceChannel (DiscordInteractionContext ctx) (tooLateToSendAddress address) +// let isWhitelist (role : DiscordRole) = +// role.Id = GuildEnvironment.roleWhitelistPending || role.Id = GuildEnvironment.roleWhiteOGPending || +// role.Id = GuildEnvironment.roleWhitelist || role.Id = GuildEnvironment.roleWhiteOG +// if ctx.Member.Roles |> Seq.exists isWhitelist then +// else +// let msg = $"You currently are not Whitelisted, go to <#{GuildEnvironment.channelWhitelist}> to purchase the role!" +// Messaging.sendSimpleResponse (DiscordInteractionContext ctx) msg +// |> Async.StartAsTask :> Task // [] // member this.ListInvitedPeople (ctx : InteractionContext) = diff --git a/Bot/paket.references b/Bot/paket.references index 823b16c..018add7 100644 --- a/Bot/paket.references +++ b/Bot/paket.references @@ -6,4 +6,5 @@ dotenv.net Npgsql.FSharp mixpanel-csharp Solnet.Rpc -FsToolkit.ErrorHandling \ No newline at end of file +FsToolkit.ErrorHandling +FSharp.Data \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 65c4be5..8c05677 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -8,6 +8,7 @@ nuget FSharp.Core >= 6.0.0 nuget DSharpPlus >= 4.3.0-nightly-01135 nuget DSharpPlus.Interactivity >= 4.3.0-nightly-01135 nuget DSharpPlus.SlashCommands >= 4.3.0-nightly-01135 +nuget FSharp.Data nuget FsToolkit.ErrorHandling nuget MongoDB.Driver diff --git a/paket.lock b/paket.lock index 4835e9b..15b27e4 100644 --- a/paket.lock +++ b/paket.lock @@ -31,6 +31,8 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 5.0) System.ValueTuple (>= 4.5) FSharp.Core (6.0.3) + FSharp.Data (4.2.8) + FSharp.Core (>= 4.7.2) FsToolkit.ErrorHandling (2.13) FSharp.Core (>= 4.7.2) Microsoft.Bcl.AsyncInterfaces (6.0) - restriction: || (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0)