/** * The {@link net.dv8tion.jda.core.entities.PrivateChannel PrivateChannel} this Reaction was used in * or {@code null} if this is not from type {@link net.dv8tion.jda.core.entities.ChannelType#PRIVATE ChannelType.PRIVATE}! * * @return The {@link net.dv8tion.jda.core.entities.PrivateChannel PrivateChannel} or {@code null} */ public PrivateChannel getPrivateChannel() { return getChannel() instanceof PrivateChannel ? (PrivateChannel) getChannel() : null; }
/** * The {@link net.dv8tion.jda.core.entities.TextChannel TextChannel} this Reaction was used in * or {@code null} if this is not from type {@link net.dv8tion.jda.core.entities.ChannelType#TEXT ChannelType.TEXT}! * * @return The {@link net.dv8tion.jda.core.entities.TextChannel TextChannel} or {@code null} */ public TextChannel getTextChannel() { return getChannel() instanceof TextChannel ? (TextChannel) getChannel() : null; }
/** * The {@link net.dv8tion.jda.client.entities.Group Group} this Reaction was used in * or {@code null} if this is not from type {@link net.dv8tion.jda.core.entities.ChannelType#GROUP ChannelType.GROUP}! * * @return The {@link net.dv8tion.jda.client.entities.Group Group} or {@code null} */ public Group getGroup() { return getChannel() instanceof Group ? (Group) getChannel() : null; }
public GenericMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction) { super(api, responseNumber, reaction.getMessageIdLong(), reaction.getChannel()); this.issuer = user; this.reaction = reaction; }
public GenericGroupMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction) { super(api, responseNumber, reaction.getMessageIdLong(), (Group) reaction.getChannel()); this.issuer = user; this.reaction = reaction; }
public GenericPrivateMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction) { super(api, responseNumber, reaction.getMessageIdLong(), (PrivateChannel) reaction.getChannel()); this.issuer = user; this.reaction = reaction; }
public GenericGuildMessageReactionEvent(JDA api, long responseNumber, User user, MessageReaction reaction) { super(api, responseNumber, reaction.getMessageIdLong(), (TextChannel) reaction.getChannel()); this.issuer = user; this.reaction = reaction; }
/** * Creates a new PaginationAction instance * * @param reaction * The target {@link net.dv8tion.jda.core.entities.MessageReaction MessageReaction} */ public ReactionPaginationAction(MessageReaction reaction) { super(reaction.getJDA(), Route.Messages.GET_REACTION_USERS.compile(reaction.getChannel().getId(), reaction.getMessageId(), getCode(reaction)), 1, 100, 100); this.reaction = reaction; }