WIP: Buttons events

This commit is contained in:
Joseph Ferano 2022-01-05 17:54:13 +07:00
parent 2565bd853f
commit bacb5d3923

View File

@ -3,7 +3,7 @@ open System.Threading.Tasks
open DSharpPlus open DSharpPlus
open DSharpPlus.Entities open DSharpPlus.Entities
open DSharpPlus.SlashCommands open DSharpPlus.SlashCommands
open Microsoft.Extensions.Logging open Emzi0767.Utilities
type Move = type Move =
| Rock | Rock
@ -201,6 +201,14 @@ config.Intents <- DiscordIntents.All
// config.MinimumLogLevel <- LogLevel.Trace // config.MinimumLogLevel <- LogLevel.Trace
let client = new DiscordClient(config) let client = new DiscordClient(config)
client.add_ComponentInteractionCreated(AsyncEventHandler(
fun client event ->
async {
return ()
} |> Async.StartAsTask
:> Task))
let slash = client.UseSlashCommands() let slash = client.UseSlashCommands()
slash.RegisterCommands<JoeBot>(); slash.RegisterCommands<JoeBot>();