Fix console spam if lack scope
This commit is contained in:
parent
f210240bd5
commit
a8d89e149c
|
@ -12,6 +12,7 @@ import net.dv8tion.jda.api.JDABuilder;
|
|||
import net.dv8tion.jda.api.OnlineStatus;
|
||||
import net.dv8tion.jda.api.entities.Activity;
|
||||
import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.exceptions.ContextException;
|
||||
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.SubcommandData;
|
||||
|
@ -244,7 +245,12 @@ public class Kiafumi {
|
|||
}
|
||||
//Push w/ modifications.
|
||||
info("Command: " + ci.getName() + " registration on " + guild.getId() + " completed.");
|
||||
cca.queue();
|
||||
try {
|
||||
cca.queue();
|
||||
} catch (Exception ex) {
|
||||
//Only time this *should* occur is in the event of a server not having the proper scope.
|
||||
error("Failed to queue command for RestAction, not printing stack to avoid console spam.");
|
||||
}
|
||||
}
|
||||
}
|
||||
info("Registered " + i + " commands.");
|
||||
|
|
Loading…
Reference in a new issue