Skip to content

Commit

Permalink
Add GenericInteractionContext
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Oct 27, 2023
1 parent 2fabb5f commit 256c580
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ import dev.kord.rest.builder.message.create.FollowupMessageCreateBuilder
import dev.kord.rest.builder.message.modify.InteractionResponseModifyBuilder
import java.util.*

/** Type alias for a generic interaction context, meant to be used with extension functions. **/
public typealias GenericInteractionContext = InteractionContext<*, *, *, *>

/**
* Interface representing an interaction context. Provides a generic base type for action contexts when working
* with interactions.
*
* More specific types representing each interaction type (ephemeral/public) extend this class.
*
* If you're writing an extension function, you'll likely want to use [GenericInteractionContext] as the
* receiver type.
*
* @param ResponseBehavior Generic representing the relevant interaction response behavior.
* @param FollowupType Generic representing the follow-up type for the current interaction type.
* @param OppositeFollowupType Generic representing the opposite follow-up type for the current interaction type.
Expand Down

0 comments on commit 256c580

Please sign in to comment.