Darkside138/DiscordSoundboard

BETA: NumberFormatExeption.forInputString after trying command with " " spaces

Closed this issue · 8 comments

java.lang.NumberFormatException: For input string: "hmm"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at net.dirtydeeds.discordsoundboard.ChatSoundBoardListener.onMessageReceived(ChatSoundBoardListener.java:241)
        at net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:326)
        at net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
        at net.dv8tion.jda.core.handle.MessageCreateHandler.handleDefaultMessage(MessageCreateHandler.java:128)
        at net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:50)
        at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:38)
        at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:688)
        at net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:437)
        at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:262)
        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:240)
        at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:965)
        at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:748)
        at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:110)
        at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:66)

Seems to be a problem with soundfiles that contain a " " Space in the filename.

same problem here

z1g commented

All due respect, but it is a pretty common practice to avoid spaces in the name of files for anything Internet related. You really should rename your sound files to include hyphens or under scores in place of spaces.

@z1g that's an obvious workaround...
@darkside its all good if you tell users they have to avoid spaces

z1g commented

@LinkPlay9 If it is so obvious why would you open a ticket? Grats on finding what you believe to be a bug and wasting others time.

z1g commented

You didn't answer the question, nobody is pissed. Have a fantastic day.

@LinkPlay9 @z1g
I've submitted a fix for this.