Try to log upload errors within discord instead of failing silently.
This commit is contained in:
parent
a017bd4e00
commit
09071534a5
@ -86,7 +86,16 @@ public class ImageListener implements MessageCreateListener {
|
||||
.setDeleteHash(upload.getDeleteHash());
|
||||
|
||||
storeAndLog(event, channel, outfitBuilder);
|
||||
}).exceptionally(ExceptionLogger.get());
|
||||
}).exceptionally(e -> {
|
||||
EmbedBuilder errorEmbed = new EmbedBuilder()
|
||||
.setTitle("Error!")
|
||||
.setColor(Color.RED)
|
||||
.setAuthor(event.getApi().getYourself())
|
||||
.setDescription(e.getMessage());
|
||||
|
||||
event.getChannel().sendMessage(errorEmbed);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
private void store(MessageCreateEvent event, ServerTextChannel channel, MessageAttachment image) {
|
||||
|
Loading…
Reference in New Issue
Block a user