open System.Threading.Tasks open DSharpPlus open DSharpPlus.Entities open DSharpPlus.SlashCommands open Emzi0767.Utilities open DegenzGame open DegenzGame.Commands type EmptyGlobalCommandToAvoidFamousDuplicateSlashCommandsBug() = inherit ApplicationCommandModule () type HackerGame() = inherit ApplicationCommandModule () [] member this.AttackCommand (ctx : InteractionContext, [] target : DiscordUser) = Commands.attack ctx target [] member this.DefendCommand (ctx : InteractionContext) = Commands.defend ctx let config = DiscordConfiguration() config.Token <- "OTMyMzI5NDAzNjYzNDEzMjQ4.YeRZaw.ZyCo5L8HFsCvx8JuhdAwqrH3hZI" config.TokenType <- TokenType.Bot config.Intents <- DiscordIntents.All //config.MinimumLogLevel <- Microsoft.Extensions.Logging.LogLevel.Trace let client = new DiscordClient(config) client.add_ComponentInteractionCreated(AsyncEventHandler(handleButtonEvent)) let slash = client.UseSlashCommands() // My server slash.RegisterCommands(922419263275425832uL); // Degenz //slash.RegisterCommands(922414052708327494uL); client.ConnectAsync () |> Async.AwaitTask |> Async.RunSynchronously Task.Delay(-1) |> Async.AwaitTask |> Async.RunSynchronously client.DisconnectAsync () |> Async.AwaitTask |> Async.RunSynchronously