use of org.togetherjava.tjbot.jda.SlashCommandEventBuilder in project TJ-Bot by Together-Java.
the class TagCommandTest method triggerSlashCommand.
@NotNull
private SlashCommandEvent triggerSlashCommand(@NotNull String id, @Nullable Member userToReplyTo) {
SlashCommandEventBuilder builder = jdaTester.createSlashCommandEvent(command).setOption(TagCommand.ID_OPTION, id);
if (userToReplyTo != null) {
builder.setOption(TagCommand.REPLY_TO_USER_OPTION, userToReplyTo);
}
SlashCommandEvent event = builder.build();
command.onSlashCommand(event);
return event;
}
Aggregations