Discord Slash is a Go package that provides an easy way to manage Discord’s new slash commands. It provides a high level API to make and register slash commands for your Discord Bot.
The package is in an early state of development, any kind of contribution is welcomed!
go get github.com/vlaetansky/discordslash
Import the package
Please refer to a DiscordGo documentation to read on how to create a DiscordGo Session.
Create a new DiscordSlash manager which provides a high level API for managing commands
DiSlash = discordslash.New(discordGoSession)
Next, the manager must be initialized
In order to register application commands you must first open a websocket connection
You can now create your own commands and register them with one of the options
During bot shutdown, you should also unregister all the commands
(Please refer to the examples folder to learn how to create commands)