use of net.dv8tion.jda.internal.interactions.command.CommandImpl in project JDA by DV8FromTheWorld.
the class CommandEditActionImpl method handleSuccess.
@Override
protected void handleSuccess(Response response, Request<Command> request) {
DataObject json = response.getObject();
request.onSuccess(new CommandImpl(api, guild, json));
}
use of net.dv8tion.jda.internal.interactions.command.CommandImpl in project JDA by DV8FromTheWorld.
the class GuildImpl method retrieveCommandById.
@Nonnull
@Override
public RestAction<Command> retrieveCommandById(@Nonnull String id) {
Checks.isSnowflake(id);
Route.CompiledRoute route = Route.Interactions.GET_GUILD_COMMAND.compile(getJDA().getSelfUser().getApplicationId(), getId(), id);
return new RestActionImpl<>(getJDA(), route, (response, request) -> new CommandImpl(getJDA(), this, response.getObject()));
}
use of net.dv8tion.jda.internal.interactions.command.CommandImpl in project JDA by DV8FromTheWorld.
the class JDAImpl method retrieveCommandById.
@Nonnull
@Override
public RestAction<Command> retrieveCommandById(@Nonnull String id) {
Checks.isSnowflake(id);
Route.CompiledRoute route = Route.Interactions.GET_COMMAND.compile(getSelfUser().getApplicationId(), id);
return new RestActionImpl<>(this, route, (response, request) -> new CommandImpl(this, null, response.getObject()));
}
use of net.dv8tion.jda.internal.interactions.command.CommandImpl in project JDA by DV8FromTheWorld.
the class CommandCreateActionImpl method handleSuccess.
@Override
protected void handleSuccess(Response response, Request<Command> request) {
DataObject json = response.getObject();
request.onSuccess(new CommandImpl(api, guild, json));
}
Aggregations