From dd5a4c1766ed9cadcd5de982f91f407adbd07f40 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 24 Feb 2026 12:57:00 +0100 Subject: feat(dynamicid): use new HandleRaw --- dynamicid/handling.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dynamicid/handling.go') 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 } -- cgit v1.2.3