Closed Blade2021 closed 4 years ago
Will check it out, probably a changed endpoint on their end.
Okay I've had a quick look and don't think this is an issue with the library. I seem to be able to create a poll fine by running the code in Example.java file.
I see your using the JDA library, presumably this is stuff running on a Discord bot. See if you can run the code in Example.java to create a poll. Not entirely sure what would have caused your error but it seems to be internal discord API stuff.
Exception in thread "main" java.lang.NullPointerException
at com.samuelmaddock.strawpollwrapper.StrawPoll.updatePoll(StrawPoll.java:137)
at com.samuelmaddock.strawpollwrapper.StrawPoll.create(StrawPoll.java:107)
at Testpackage.Example.main(Example.java:13)
Execution failed for task ':Example.main()'.
> Process 'command 'C:/Program Files/Java/jdk-13.0.1/bin/java.exe'' finished with non-zero exit value 1
This is running inside gradle in a completely separate Java Project with the Example you tagged.
You are correct about the discord bot. Looking to integrate this into it which would be sweet if we can get it working.
Just to double check what version did you install via Gradle? I think the current documentation links you to the Jitpack instructions to v1.0.0 which is broken.
Is your gradle installing the 1.0.4 depository?
For reference, the instructions for 1.0.4 are here
And there it is! That did it. I was indeed building with v1.0.0. Updated to v1.0.4 and everything ran great.
Thanks! Great work!
Great! I have to admit I've never tried using this with Gradle but good to know it works. I'll update the docs to properly link to the 1.0.4 Jitpack instructions.
Not sure whats going on here. Using the simplest declaration gives the error as well. I'm using gradle and imported using jitpack as the documentation describes.