
com.freya02.botcommands.api.commands.prefixed.CommandEvent Maven / Gradle / Ivy
package com.freya02.botcommands.api.commands.prefixed;
import com.freya02.botcommands.api.commands.prefixed.exceptions.BadIdException;
import com.freya02.botcommands.api.commands.prefixed.exceptions.NoIdException;
import com.freya02.botcommands.internal.BContextImpl;
import com.freya02.botcommands.internal.commands.prefixed.BaseCommandEventImpl;
import net.dv8tion.jda.api.entities.IMentionable;
import net.dv8tion.jda.api.entities.Role;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.NoSuchElementException;
/**
* Text command event containing all the information about the triggered command.
*
* Arguments are tokenized and resolved into entities if possible
*
*
This is only used as a command fallback
*
* @see BaseCommandEvent
*/
public abstract class CommandEvent extends BaseCommandEventImpl {
public CommandEvent(BContextImpl context, MessageReceivedEvent event, String args) {
super(context, event, args);
}
/**
* Returns the resolved arguments of the command event, these can be a {@linkplain User}, {@linkplain Role}, {@linkplain TextChannel} or a {@linkplain String}
*
* @return List of arguments
*/
public abstract List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy