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
testplugin/main.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import (
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/vaporvee/acecore/struct_cmd"
)
var Plugin = &struct_cmd.Plugin{
Register: func(client bot.Client, commands *[]struct_cmd.Command) error {
*commands = append(*commands, struct_cmd.Command{
Definition: discord.SlashCommandCreate{
Name: "TESTPLUGIN",
Description: "TESTPLUGIN",
},
Interact: func(e *events.ApplicationCommandInteractionCreate) {
e.CreateMessage(discord.NewMessageCreateBuilder().SetContent("TEST").SetEphemeral(true).Build())
},
})
return nil
},
}