use of net.dv8tion.jda.api.interactions.commands.OptionMapping in project TamaBot by Loli-Cafe.
the class HandJobCommand 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 gave %s handjob", event.getUser().getAsMention(), optionMapping.getAsUser().getAsMention()))).queue();
}
use of net.dv8tion.jda.api.interactions.commands.OptionMapping in project TamaBot by Loli-Cafe.
the class StepCommand method compose.
@Override
public void compose(SlashCommandInteractionEvent event) {
OptionMapping optionMapping = event.getOption("user");
if (optionMapping == null)
throw new CommandException(getUsage());
event.replyEmbeds(execute(String.format("%s stepped at %s", event.getUser().getAsMention(), optionMapping.getAsUser().getAsMention()))).queue();
}
use of net.dv8tion.jda.api.interactions.commands.OptionMapping in project TamaBot by Loli-Cafe.
the class GelbooruCommand method compose.
@Override
public void compose(SlashCommandInteractionEvent event) {
OptionMapping tags = event.getOption("tags");
OptionMapping rating = event.getOption("rating");
OptionMapping search = event.getOption("search");
if (search != null) {
event.replyEmbeds(execute(search.getAsString(), event.getUser())).queue();
} else {
event.replyEmbeds(execute(TagsParser.parse(rating != null ? rating.getAsString() : "e", tags != null ? tags.getAsString().split(" ") : new String[] { "loli" }), event.getUser())).queue();
}
}
use of net.dv8tion.jda.api.interactions.commands.OptionMapping in project TamaBot by Loli-Cafe.
the class ScatCommand method compose.
@Override
public void compose(SlashCommandInteractionEvent event) {
checkContext(event.getMember(), event.getTextChannel());
OptionMapping optionMapping = event.getOption("user");
event.replyEmbeds(execute((optionMapping != null ? String.format("%s shitted on %s", event.getUser(), optionMapping.getAsUser().getAsMention()) : (event.getUser().getAsMention() + " shit yourself")), optionMapping != null)).queue();
}
use of net.dv8tion.jda.api.interactions.commands.OptionMapping in project TamaBot by Loli-Cafe.
the class SpankCommand method compose.
@Override
public void compose(SlashCommandInteractionEvent event) {
checkContext(event.getMember(), event.getTextChannel());
OptionMapping optionMapping = event.getOption("user");
event.replyEmbeds(execute(optionMapping != null ? String.format("%s spanks %s", event.getUser(), optionMapping.getAsUser().getAsMention()) : (event.getUser().getAsMention() + " would like to spanked"))).queue();
}
Aggregations