Just show mint time
This commit is contained in:
parent
9fab8e79cb
commit
befcdf6e5e
@ -60,26 +60,35 @@ let grantWhitelistRole isOg (ctx : IDiscordContext) =
|
|||||||
|
|
||||||
let handleButtonEvent _ (event : ComponentInteractionCreateEventArgs) =
|
let handleButtonEvent _ (event : ComponentInteractionCreateEventArgs) =
|
||||||
let ctx = DiscordEventContext event :> IDiscordContext
|
let ctx = DiscordEventContext event :> IDiscordContext
|
||||||
match event.Id with
|
task {
|
||||||
| id when id.StartsWith("GimmeWhitelist") -> Store.buy "WHITELIST" None ctx
|
let builder = DiscordInteractionResponseBuilder()
|
||||||
| id when id.StartsWith("Buy") ->
|
builder.IsEphemeral <- true
|
||||||
task {
|
builder.Content <- $"🚀 __Mint Date:__ June 20th 6:30 UTC <t:1655749800:R>"
|
||||||
let id = ctx.GetInteractionId()
|
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, builder) |> Async.AwaitTask
|
||||||
let itemId = id.Split("-").[1]
|
} : Task
|
||||||
let dispatch ctx = grantWhitelistRole (itemId = "WHITEOG") ctx
|
|
||||||
|
//let handleButtonEvent _ (event : ComponentInteractionCreateEventArgs) =
|
||||||
do! Store.handleBuyItem dispatch ctx itemId
|
// let ctx = DiscordEventContext event :> IDiscordContext
|
||||||
} :> Task
|
// match event.Id with
|
||||||
| id when id.StartsWith("CreateGuildInvite") -> InviteTracker.handleCreateInvite ctx
|
// | id when id.StartsWith("GimmeWhitelist") -> Store.buy "WHITELIST" None ctx
|
||||||
| id when id.StartsWith("ShowRecruited") -> InviteTracker.getInvitedUsersForId (ctx.GetDiscordMember()) ctx
|
// | id when id.StartsWith("Buy") ->
|
||||||
| id when id.StartsWith("WalletStatus") -> InviteTracker.showWalletStatus ctx
|
// task {
|
||||||
| _ ->
|
// let id = ctx.GetInteractionId()
|
||||||
task {
|
// let itemId = id.Split("-").[1]
|
||||||
let builder = DiscordInteractionResponseBuilder()
|
// let dispatch ctx = grantWhitelistRole (itemId = "WHITEOG") ctx
|
||||||
builder.IsEphemeral <- true
|
//
|
||||||
builder.Content <- $"Incorrect Action identifier {ctx.GetInteractionId()}"
|
// do! Store.handleBuyItem dispatch ctx itemId
|
||||||
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, builder) |> Async.AwaitTask
|
// } :> Task
|
||||||
}
|
// | id when id.StartsWith("CreateGuildInvite") -> InviteTracker.handleCreateInvite ctx
|
||||||
|
// | id when id.StartsWith("ShowRecruited") -> InviteTracker.getInvitedUsersForId (ctx.GetDiscordMember()) ctx
|
||||||
|
// | id when id.StartsWith("WalletStatus") -> InviteTracker.showWalletStatus ctx
|
||||||
|
// | _ ->
|
||||||
|
// task {
|
||||||
|
// let builder = DiscordInteractionResponseBuilder()
|
||||||
|
// builder.IsEphemeral <- true
|
||||||
|
// builder.Content <- $"Incorrect Action identifier {ctx.GetInteractionId()}"
|
||||||
|
// do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, builder) |> Async.AwaitTask
|
||||||
|
// }
|
||||||
|
|
||||||
let setCurrentWhitelistStock amount (ctx : IDiscordContext) =
|
let setCurrentWhitelistStock amount (ctx : IDiscordContext) =
|
||||||
task {
|
task {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user