diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-24 12:57:00 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-24 12:57:00 +0100 |
| commit | dd5a4c1766ed9cadcd5de982f91f407adbd07f40 (patch) | |
| tree | 33ce211e6f1852c4e3b8ff9fb1c6eaa4c83333e0 /dynamicid/handling.go | |
| parent | 772b22ada53dca7391b781dd7b5d14d2130cf277 (diff) | |
feat(dynamicid): use new HandleRaw
Diffstat (limited to 'dynamicid/handling.go')
| -rw-r--r-- | dynamicid/handling.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dynamicid/handling.go b/dynamicid/handling.go index 08d1620..44223f1 100644 --- a/dynamicid/handling.go +++ b/dynamicid/handling.go @@ -6,16 +6,16 @@ import ( "github.com/nyttikord/gokord/bot" "github.com/nyttikord/gokord/discord/types" - "github.com/nyttikord/gokord/event" "github.com/nyttikord/gokord/interaction" + "github.com/nyttikord/gokord/interaction/interactionhandler" ) func HandleDynamicMessageComponent[T any]( - events bot.EventManager, + m *interactionhandler.Manager, handler func(context.Context, bot.Session, *interaction.MessageComponent, T), base string, ) { - events.AddHandler(func(ctx context.Context, dg bot.Session, i *event.InteractionCreate) { + m.HandleRaw(func(ctx context.Context, dg bot.Session, i *interaction.Interaction) { if i.Type != types.InteractionMessageComponent { return } @@ -36,12 +36,12 @@ func HandleDynamicMessageComponent[T any]( } func HandleDynamicModalComponent[T any]( - events bot.EventManager, + m *interactionhandler.Manager, handler func(context.Context, bot.Session, *interaction.ModalSubmit, T), base string, ) { - events.AddHandler(func(ctx context.Context, dg bot.Session, i *event.InteractionCreate) { + m.HandleRaw(func(ctx context.Context, dg bot.Session, i *interaction.Interaction) { if i.Type != types.InteractionModalSubmit { return } |
