Skip to content

Commit 201dba8

Browse files
committed
updated info log strings
1 parent 26c2c90 commit 201dba8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private static void createThread(Message message) {
6161
}, exception -> {
6262
if (exception instanceof ErrorResponseException responseException
6363
&& responseException.getErrorResponse() == ErrorResponse.UNKNOWN_MESSAGE) {
64-
logger.info("Create Thread skipped: ID: {}", message.getIdLong());
64+
logger.info("Failed to start suggestion thread: source message deleted");
6565
return;
6666

6767
}
@@ -101,17 +101,17 @@ private static void reactWith(String emojiName, Emoji fallbackEmoji, Guild guild
101101
emojiName);
102102
return message.addReaction(fallbackEmoji);
103103
}).queue(_ -> {
104-
}, exception -> handleReactionFailure(exception, message.getIdLong()));
104+
}, SuggestionsUpDownVoter::handleReactionFailure);
105105
}
106106

107-
private static void handleReactionFailure(Throwable exception, long messageId) {
107+
private static void handleReactionFailure(Throwable exception) {
108108
if (exception instanceof ErrorResponseException responseException) {
109109
if (responseException.getErrorResponse() == ErrorResponse.REACTION_BLOCKED) {
110110
// User blocked the bot, hence the bot can not add reactions to their messages.
111111
return;
112112
}
113113
if (responseException.getErrorResponse() == ErrorResponse.UNKNOWN_MESSAGE) {
114-
logger.info("Reaction skipped ID: {}", messageId);
114+
logger.info("Failed to react to suggestion: source message deleted");
115115
return;
116116
}
117117
}

0 commit comments

Comments
 (0)