Correctly unwrap old CommandExceptions in AsyncCommandBuilder.

This commit is contained in:
wizjany
2019-06-13 14:35:00 -04:00
parent 7787f2c15e
commit 6e833a9fe4
2 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public abstract class PaginationBox extends MessageBox {
public Component create(int page) throws InvalidComponentException {
if (page == 1 && getComponentsSize() == 0) {
return getContents().reset().append("There's nothing to see here").create();
return getContents().reset().append("No results found.").create();
}
int pageCount = (int) Math.ceil(getComponentsSize() / (double) componentsPerPage);
if (page < 1 || page > pageCount) {