DiscordSRV

DiscordSRV

86.8k Downloads

Purge command, sending command to console (receiving command)

Shadowhackercz opened this issue ยท 1 comments

commented

Hi, I got some problems now with the DiscordSRV.

When I send command to purge messages in chat channel in Discord, it works, however, in console it says exactly this:

[11:09:33] [ReadingThread/WARN]: [11:09:33] [Fatal] [JDA]: One of the EventListeners had an uncaught exception
[11:09:33] [ReadingThread/WARN]: [11:09:33] [Fatal] [JDA]: Encountered an exception:
[11:09:33] [ReadingThread/WARN]: [11:09:33] [Fatal] [JDA]: java.util.ConcurrentModificationException
	at java.util.SubList.checkForComodification(AbstractList.java:769)
	at java.util.SubList.listIterator(AbstractList.java:695)
	at java.util.AbstractList.listIterator(AbstractList.java:299)
	at java.util.SubList.iterator(AbstractList.java:691)
	at java.util.AbstractCollection.contains(AbstractCollection.java:99)
	at java.util.AbstractCollection.removeAll(AbstractCollection.java:375)
	at com.scarsz.discordsrv.DiscordSRV.purgeChannel(DiscordSRV.java:813)
	at com.scarsz.discordsrv.listeners.DiscordListener.handleChannelPurge(DiscordListener.java:74)
	at com.scarsz.discordsrv.listeners.DiscordListener.onGuildMessageReceived(DiscordListener.java:48)
	at com.scarsz.discordsrv.jda.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:166)
	at com.scarsz.discordsrv.jda.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:64)
	at com.scarsz.discordsrv.jda.handle.MessageReceivedHandler.handleDefaultMessage(MessageReceivedHandler.java:81)
	at com.scarsz.discordsrv.jda.handle.MessageReceivedHandler.handleInternally(MessageReceivedHandler.java:50)
	at com.scarsz.discordsrv.jda.handle.SocketHandler.handle(SocketHandler.java:38)
	at com.scarsz.discordsrv.jda.requests.WebSocketClient.handleEvent(WebSocketClient.java:596)
	at com.scarsz.discordsrv.jda.requests.WebSocketClient.onTextMessage(WebSocketClient.java:324)
	at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
	at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:233)
	at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:211)
	at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:910)
	at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:693)
	at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:102)
	at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:61)

This is the error that comes when I execute Purge chat command.

And the second error, I figured it out. It's because I have in settings to automatically restart server, if it's not responding. And in the DiscordSRV config I got settings to delete last messages and it's set to 10 seconds. However I don't know why server thinks it's not responding.. It's somehow weird.

That error is only that server is not responding etc.. Nothing else.

So - the second error is now fixed for now, I deleted the time for deleting last command (Command Expiration).

DiscordSRV sends message to Discord, waits X seconds to delete the message, then puts another line of text from the console etc.. So that's why it's thinking the server is not somehow responding..

I hope it's all, it's a little bit confusing, sorry :-D

commented

Closing due to code changing and no longer being valid