End WL submissions

This commit is contained in:
Joseph Ferano 2022-06-20 20:31:35 +07:00
parent eaac95b733
commit 9fab8e79cb
4 changed files with 26 additions and 11 deletions

View File

@ -395,7 +395,7 @@ let showWalletStatus (ctx : IDiscordContext) =
do! Messaging.sendFollowUpMessage ctx "Something went wrong retrieving your wallet address" do! Messaging.sendFollowUpMessage ctx "Something went wrong retrieving your wallet address"
}) })
let sendSubmitEmbed (ctx : IDiscordContext) = let sendSubmitEmbed (_ : IDiscordContext) =
async { async {
try try
let rewardMsg = $""" let rewardMsg = $"""
@ -538,6 +538,17 @@ Keep an eye on <#{GuildEnvironment.channelAnnouncements}> for updates."""
do! Analytics.invalidWalletSubmit (ctx.GetDiscordMember()) 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() = type Inviter() =
inherit ApplicationCommandModule () inherit ApplicationCommandModule ()
@ -552,15 +563,15 @@ type Inviter() =
[<SlashCommand("submit", "Submit your public wallet address")>] [<SlashCommand("submit", "Submit your public wallet address")>]
member this.SubmitAddress (ctx : InteractionContext, [<Option("address", "Wallet address")>] address : string) = member this.SubmitAddress (ctx : InteractionContext, [<Option("address", "Wallet address")>] address : string) =
let isWhitelist (role : DiscordRole) = enforceChannel (DiscordInteractionContext ctx) (tooLateToSendAddress address)
role.Id = GuildEnvironment.roleWhitelistPending || role.Id = GuildEnvironment.roleWhiteOGPending || // let isWhitelist (role : DiscordRole) =
role.Id = GuildEnvironment.roleWhitelist || role.Id = GuildEnvironment.roleWhiteOG // role.Id = GuildEnvironment.roleWhitelistPending || role.Id = GuildEnvironment.roleWhiteOGPending ||
if ctx.Member.Roles |> Seq.exists isWhitelist then // role.Id = GuildEnvironment.roleWhitelist || role.Id = GuildEnvironment.roleWhiteOG
enforceChannel (DiscordInteractionContext ctx) (submitAddress address) // if ctx.Member.Roles |> Seq.exists isWhitelist then
else // else
let msg = $"You currently are not Whitelisted, go to <#{GuildEnvironment.channelWhitelist}> to purchase the role!" // let msg = $"You currently are not Whitelisted, go to <#{GuildEnvironment.channelWhitelist}> to purchase the role!"
Messaging.sendSimpleResponse (DiscordInteractionContext ctx) msg // Messaging.sendSimpleResponse (DiscordInteractionContext ctx) msg
|> Async.StartAsTask :> Task // |> Async.StartAsTask :> Task
// [<SlashCommand("recruited", "Get total invites from a specific user")>] // [<SlashCommand("recruited", "Get total invites from a specific user")>]
// member this.ListInvitedPeople (ctx : InteractionContext) = // member this.ListInvitedPeople (ctx : InteractionContext) =

View File

@ -7,3 +7,4 @@ Npgsql.FSharp
mixpanel-csharp mixpanel-csharp
Solnet.Rpc Solnet.Rpc
FsToolkit.ErrorHandling FsToolkit.ErrorHandling
FSharp.Data

View File

@ -8,6 +8,7 @@ nuget FSharp.Core >= 6.0.0
nuget DSharpPlus >= 4.3.0-nightly-01135 nuget DSharpPlus >= 4.3.0-nightly-01135
nuget DSharpPlus.Interactivity >= 4.3.0-nightly-01135 nuget DSharpPlus.Interactivity >= 4.3.0-nightly-01135
nuget DSharpPlus.SlashCommands >= 4.3.0-nightly-01135 nuget DSharpPlus.SlashCommands >= 4.3.0-nightly-01135
nuget FSharp.Data
nuget FsToolkit.ErrorHandling nuget FsToolkit.ErrorHandling
nuget MongoDB.Driver nuget MongoDB.Driver

View File

@ -31,6 +31,8 @@ NUGET
System.Runtime.CompilerServices.Unsafe (>= 5.0) System.Runtime.CompilerServices.Unsafe (>= 5.0)
System.ValueTuple (>= 4.5) System.ValueTuple (>= 4.5)
FSharp.Core (6.0.3) FSharp.Core (6.0.3)
FSharp.Data (4.2.8)
FSharp.Core (>= 4.7.2)
FsToolkit.ErrorHandling (2.13) FsToolkit.ErrorHandling (2.13)
FSharp.Core (>= 4.7.2) FSharp.Core (>= 4.7.2)
Microsoft.Bcl.AsyncInterfaces (6.0) - restriction: || (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0) Microsoft.Bcl.AsyncInterfaces (6.0) - restriction: || (&& (== net6.0) (< netstandard2.1)) (== netstandard2.0)