getInteraction<T extends CommandInteraction> method

T getInteraction<T extends CommandInteraction>(
  1. CommandScope scope
)

Implementation

T getInteraction<T extends CommandInteraction>(CommandScope scope) {
  return scope.isGuild
      ? GuildCommandInteraction.fromPayload(_payload) as T
      : GlobalCommandInteraction.fromPayload(_payload) as T;
}