-
-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedpriority: normal
Description
The ScamBlocker sends DMs to the authors of a message to inform them about the action. Thats totally fine and expected, but failure to DM a user (for example if they blocked DMs), it should not yield to an exception being thrown in the logs:
net.dv8tion.jda.api.requests.RestAction ERROR RestAction queue returned failure: [ErrorResponseException] 50007: Cannot send messages to this user net.dv8tion.jda.api.exceptions.ContextException at net.dv8tion.jda.api.exceptions.ContextException.here(ContextException.java:54) at net.dv8tion.jda.internal.requests.restaction.operator.RestActionOperator.contextWrap(RestActionOperator.java:123) at net.dv8tion.jda.internal.requests.restaction.operator.FlatMapRestAction.queue(FlatMapRestAction.java:50) at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:572) at net.dv8tion.jda.api.requests.RestAction.queue(RestAction.java:538) at org.togetherjava.tjbot.commands.moderation.scam.ScamBlocker.dmUser(ScamBlocker.java:256) at org.togetherjava.tjbot.commands.moderation.scam.ScamBlocker.dmUser(ScamBlocker.java:252) at org.togetherjava.tjbot.commands.moderation.scam.ScamBlocker.takeActionAutoDeleteAndQuarantine(ScamBlocker.java:189) at org.togetherjava.tjbot.commands.moderation.scam.ScamBlocker.takeAction(ScamBl... 01/03/2023 5:52 PM
The actual DM sending should probably use mapToResults() and then maybe send a DEBUG level log message:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedpriority: normal
