JDA-Applications / JDA-Utilities

A series of tools and utilities for JDA to assist in bot creation
Apache License 2.0
215 stars 108 forks source link

Unicode emotji doesn't work with JDA 3.0.0_191 #13

Closed gt22 closed 7 years ago

gt22 commented 7 years ago

If unicode emoji passed in CommandClientBuilder#setEmojis it will cause NumberFormatException, becouse when reacting CommandEvent tries to use JDA#getEmoteById, which throw NFE when givem string can't be parsed. Check in CommandEvent is for null return, and try/catch only for PermissionException so NFE catched in JDA only.

Shengaero commented 7 years ago

There is a fix coming for this soon.

jagrosh commented 7 years ago

This is already fixed, and a NumberFormatException cannot be thrown: https://github.com/JDA-Applications/JDA-Utilities/blob/master/src/main/java/com/jagrosh/jdautilities/commandclient/CommandEvent.java#L311-L319 Make sure you're on the latest version.

gt22 commented 7 years ago

I actually can't get 1.1 version, gradle can't find it. build.gradle:

apply plugin: 'java'

repositories {
    jcenter()
    mavenCentral()
}

dependencies {
    compile 'com.jagrosh:JDA-Utilities:1.1'
    compile 'net.dv8tion:JDA:3.0.0_191'
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'org.jooq:jool:0.9.12'
}

(1.0 version with me.jagrosh... works fine)

Shengaero commented 7 years ago
repositories {
    jcenter()
    maven { url 'https://dl.bintray.com/jagrosh/maven/' }
}

dependencies {
    compile 'net.dv8tion:JDA:3.0.0_191'
    compile 'com.jagrosh:JDA-Utilities:1.1'
}

Try this @gt22.

gt22 commented 7 years ago

@TheMonitorLizard, thanks. I think this repo should be included in readme?

Shengaero commented 7 years ago

Yes, I'll make sure to include it in my PR once version 1.2 comes out 😄