started adding plugin system

This commit is contained in:
2024-04-14 20:03:57 +02:00
parent 36b8941eac
commit bc4ada155b
22 changed files with 180 additions and 40 deletions

23
struct_cmd/main.go Normal file
View File

@@ -0,0 +1,23 @@
package struct_cmd
import (
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
)
type Command struct {
Definition discord.ApplicationCommandCreate
Interact func(e *events.ApplicationCommandInteractionCreate)
Autocomplete func(e *events.AutocompleteInteractionCreate)
ComponentInteract func(e *events.ComponentInteractionCreate)
ModalSubmit func(e *events.ModalSubmitInteractionCreate)
ComponentIDs []string
ModalIDs []string
DynamicModalIDs func() []string
DynamicComponentIDs func() []string
}
type Plugin struct {
Register func(client bot.Client, commands *[]Command) error
}