added user facing message in case the initial modmail creation fails

This commit is contained in:
Sheldan
2020-05-06 23:41:35 +02:00
parent feb9ce07ee
commit cb1a14e46b
6 changed files with 31 additions and 10 deletions

View File

@@ -191,8 +191,12 @@ public class ChannelServiceBean implements ChannelService {
if(categoryById != null) {
return categoryById.createTextChannel(name).submit();
}
return null;
CompletableFuture<TextChannel> objectCompletableFuture = new CompletableFuture<>();
objectCompletableFuture.completeExceptionally(new AbstractoRunTimeException("Mod mail category is not setup."));
return objectCompletableFuture;
}
return null;
CompletableFuture<TextChannel> objectCompletableFuture = new CompletableFuture<>();
objectCompletableFuture.completeExceptionally(new AbstractoRunTimeException("Guild to create mod mail channel for was not found."));
return objectCompletableFuture;
}
}