-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Currently, ComponentHandlers accept a ComponentData interface, and assertions must be done by the user. The user can make a mistake where an incorrect ID is used, causing a handler that expects one type to get an interaction of another type.
API proposal:
// Usage:
h.AddComponent("id", func(ctx context.Context, data ComponentData[*discord.ButtonInteraction]) {})
// Decls:
type ComponentData[T discord.ComponentInteraction] {...}
type ComponentHandler[T discord.ComponentInteraction] {...}
func (r *Router) AddComponent[T discord.ComponentInteraction](...)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels