Search in sources :

Example 6 with CommandException

use of uwu.narumi.tama.command.CommandException in project TamaBot by Loli-Cafe.

the class DeepthroatCommand method compose.

@Override
public void compose(SlashCommandInteractionEvent event) {
    checkContext(event.getMember(), event.getTextChannel());
    OptionMapping optionMapping = event.getOption("user");
    if (optionMapping == null)
        throw new CommandException(getUsage());
    event.replyEmbeds(execute(String.format("%s had deepthroat sex with %s", event.getUser().getAsMention(), optionMapping.getAsUser().getAsMention()))).queue();
}
Also used : OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) CommandException(uwu.narumi.tama.command.CommandException)

Example 7 with CommandException

use of uwu.narumi.tama.command.CommandException in project TamaBot by Loli-Cafe.

the class DestroyCommand method compose.

@Override
public void compose(MessageReceivedEvent event, String... args) {
    checkContext(event.getMember(), event.getTextChannel());
    if (!DiscordHelper.hasMention(event, Message.MentionType.USER))
        throw new CommandException(getUsage());
    event.getTextChannel().sendMessageEmbeds(execute(String.format("%s destroyed %s", event.getAuthor().getAsMention(), DiscordHelper.getMention(event, Message.MentionType.USER).getAsMention()))).queue();
}
Also used : CommandException(uwu.narumi.tama.command.CommandException)

Example 8 with CommandException

use of uwu.narumi.tama.command.CommandException in project TamaBot by Loli-Cafe.

the class DestroyCommand method compose.

@Override
public void compose(SlashCommandInteractionEvent event) {
    checkContext(event.getMember(), event.getTextChannel());
    OptionMapping optionMapping = event.getOption("user");
    if (optionMapping == null)
        throw new CommandException(getUsage());
    event.replyEmbeds(execute(String.format("%s destroyed %s", event.getUser().getAsMention(), optionMapping.getAsUser().getAsMention()))).queue();
}
Also used : OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) CommandException(uwu.narumi.tama.command.CommandException)

Example 9 with CommandException

use of uwu.narumi.tama.command.CommandException in project TamaBot by Loli-Cafe.

the class DobulePenetrationCommand method compose.

@Override
public void compose(SlashCommandInteractionEvent event) {
    checkContext(event.getMember(), event.getTextChannel());
    OptionMapping optionMapping = event.getOption("user");
    if (optionMapping == null)
        throw new CommandException(getUsage());
    event.replyEmbeds(execute(String.format("%s was double penetrated by %s", event.getUser().getAsMention(), optionMapping.getAsUser().getAsMention()))).queue();
}
Also used : OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) CommandException(uwu.narumi.tama.command.CommandException)

Example 10 with CommandException

use of uwu.narumi.tama.command.CommandException in project TamaBot by Loli-Cafe.

the class DobulePenetrationCommand method compose.

@Override
public void compose(MessageReceivedEvent event, String... args) {
    checkContext(event.getMember(), event.getTextChannel());
    if (!DiscordHelper.hasMention(event, Message.MentionType.USER))
        throw new CommandException(getUsage());
    event.getTextChannel().sendMessageEmbeds(execute(String.format("%s was double penetrated by %s", event.getAuthor().getAsMention(), DiscordHelper.getMention(event, Message.MentionType.USER).getAsMention()))).queue();
}
Also used : CommandException(uwu.narumi.tama.command.CommandException)

Aggregations

CommandException (uwu.narumi.tama.command.CommandException)86 OptionMapping (net.dv8tion.jda.api.interactions.commands.OptionMapping)44 TextChannel (net.dv8tion.jda.api.entities.TextChannel)10 Role (net.dv8tion.jda.api.entities.Role)2