Change buttons
This commit is contained in:
parent
c0282083a2
commit
bf7e5d08bf
@ -136,15 +136,6 @@ let sleepTime = 1500
|
||||
let mutable guildEmojis : Map<string, DiscordEmoji> option = None
|
||||
let mutable anyEmoji : DiscordEmoji option = None
|
||||
|
||||
let embedButtons includePrizeTable =
|
||||
let button1 = DiscordButtonComponent(ButtonStyle.Success, $"spin-1x", $"Bet 1x - {PlayPricex1} $GBT") :> DiscordComponent
|
||||
let button2 = DiscordButtonComponent(ButtonStyle.Success, $"spin-2x", $"Bet 2x - {PlayPricex2} $GBT") :> DiscordComponent
|
||||
let button3 = DiscordButtonComponent(ButtonStyle.Success, $"spin-3x", $"Bet 3x - {PlayPricex3} $GBT") :> DiscordComponent
|
||||
let button4 = DiscordButtonComponent(ButtonStyle.Primary, $"prizes", $"Show Prizes") :> DiscordComponent
|
||||
if includePrizeTable
|
||||
then [| button1 ; button2 ; button3 ; button4 |]
|
||||
else [| button1 ; button2 ; button3 |]
|
||||
|
||||
let getJackpotAmount () =
|
||||
GuildEnvironment.connectionString
|
||||
|> Sql.connect
|
||||
@ -294,7 +285,11 @@ let spin multiplier (ctx : IDiscordContext) =
|
||||
return "LOST" , 0<GBT>
|
||||
}
|
||||
let dwb = DiscordWebhookBuilder()
|
||||
dwb.AddComponents(embedButtons false).AddEmbed(embed).WithContent(slotsContent) |> ignore
|
||||
let betText mult = if mult = multiplier then "Spin Again" else "Bet"
|
||||
let button1 = DiscordButtonComponent(ButtonStyle.Success, $"spin-1x", $"{betText 1} {PlayPricex1} $GBT 🎰") :> DiscordComponent
|
||||
let button2 = DiscordButtonComponent(ButtonStyle.Success, $"spin-2x", $"{betText 2} {PlayPricex2} $GBT 🎰") :> DiscordComponent
|
||||
let button3 = DiscordButtonComponent(ButtonStyle.Success, $"spin-3x", $"{betText 3} {PlayPricex3} $GBT 🎰") :> DiscordComponent
|
||||
dwb.AddComponents([| button1 ; button2 ; button3 |]).AddEmbed(embed).WithContent(slotsContent) |> ignore
|
||||
do! itx.EditFollowupMessageAsync(followUpMessage.Id, dwb) |> Async.AwaitTask |> Async.Ignore
|
||||
do! Analytics.slotPlayed (ctx.GetDiscordMember()) playAmount result prizeAmount
|
||||
}
|
||||
@ -345,7 +340,11 @@ let sendInitialEmbed (ctx : IDiscordContext) =
|
||||
|
||||
builder.AddEmbed(embed) |> ignore
|
||||
|
||||
builder.AddComponents(embedButtons true) |> ignore
|
||||
let button1 = DiscordButtonComponent(ButtonStyle.Success, $"spin-1x", $"Bet 1x - {PlayPricex1} $GBT 🎰") :> DiscordComponent
|
||||
let button2 = DiscordButtonComponent(ButtonStyle.Success, $"spin-2x", $"Bet 2x - {PlayPricex2} $GBT 🎰") :> DiscordComponent
|
||||
let button3 = DiscordButtonComponent(ButtonStyle.Success, $"spin-3x", $"Bet 3x - {PlayPricex3} $GBT 🎰") :> DiscordComponent
|
||||
let button4 = DiscordButtonComponent(ButtonStyle.Primary, $"prizes", $"Show Prizes") :> DiscordComponent
|
||||
builder.AddComponents([| button1 ; button2 ; button3 ; button4 |]) |> ignore
|
||||
do! GuildEnvironment.botClientSlots.Value.SendMessageAsync(channel, builder)
|
||||
|> Async.AwaitTask
|
||||
|> Async.Ignore
|
||||
|
Loading…
x
Reference in New Issue
Block a user