Skip to content

Commit

Permalink
Introduce getter for interaction class instances in event
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldmensch committed Jan 12, 2025
1 parent b31d38d commit 11bf707
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ public KeyValueStore kv() {
return runtime.keyValueStore();
}

/// Returns an instance of a class annotated with [`Interaction`][com.github.kaktushose.jda.commands.annotations.interactions.Interaction],
/// that is bound to the underlying [`Runtime`]({@docRoot}/index.html#runtime-concept-heading).
/// @return the interaction class instance
@Nullable
public <T> T interactionClass(Class<T> interactionClass) {
return runtime.interactionClass(interactionClass);
}

@Override
public int getTypeRaw() {
Expand Down

0 comments on commit 11bf707

Please # to comment.