Getting an java.lang.IllegalStateException on message.delete().queue() #1574
Unanswered
Beutilo
asked this question in
Questions and Help
Replies: 2 comments 4 replies
-
The stacktrace and error does not match. The stacktrace says you’ve called
getGuild in line 21 but you have getMessage there. Are you showing the
correct code?
Neverthless, the error is you’ve tried to get a Guild object when the
message is not from one; and you should get help through Discord, not here.
|
Beta Was this translation helpful? Give feedback.
4 replies
-
The best way to fix this issue, if you still want to delete messages when possible is to either use (Also, don't forget to always select an response as solution if it helped you solving the issue, as that helps others finding solutions to similar problems.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys!
Following problem.
I have a bot which answers in the private channel (dm). I have to "delete" the messages of the users of the queue in order to not have duplicate answers.
For example if I do not delete the message)
User msg: !info
Bot: xanswer
User msg: !info
Bot: xanswer
Bot: xanswer
Now I fixed the problem by the following quote, the problem is that I get an exception in the console (it still works tho).
Here a picture:
Beta Was this translation helpful? Give feedback.
All reactions