Skip to content

Commit

Permalink
Fix for NPE on handling String > 2000 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadMoirai committed Feb 3, 2018
1 parent 50e2de2 commit 181a49b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins {
final author = 'BreadMoirai'
final artifactId = 'breadbot-framework'
group "com.github.${author.toLowerCase()}"
version '0.12.3'
version '0.12.4'

//project.hasProperty never seems to work properly
final boolean keysArePresent = false
Expand All @@ -45,7 +45,7 @@ repositories {

dependencies {
//Discord Java Library
compileOnly 'net.dv8tion:JDA:3.4.0_324'
compileOnly 'net.dv8tion:JDA:3.5.0_334'

compile 'org.slf4j:slf4j-api:1.7.25'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ public void dispatch(LongConsumer linkReceiver) {
final Message poll = messages.poll();
if (!messages.isEmpty()) {
if (delay > 0)
channel.sendMessage(message).queueAfter(delay, unit, m -> linkReceiver.accept(m.getIdLong()), failure);
channel.sendMessage(poll).queueAfter(delay, unit, m -> linkReceiver.accept(m.getIdLong()), failure);
else
channel.sendMessage(message).queue(m -> linkReceiver.accept(m.getIdLong()), failure);
channel.sendMessage(poll).queue(m -> linkReceiver.accept(m.getIdLong()), failure);
} else {
final RestAction<Message> restAction;
if (file != null) {
restAction = file.sendFile(channel, message);
restAction = file.sendFile(channel, poll);
} else {
restAction = channel.sendMessage(message);
restAction = channel.sendMessage(poll);
}
if (delay > 0)
restAction.queueAfter(delay, unit, success.andThen(m -> linkReceiver.accept(m.getIdLong())), failure);
Expand Down

0 comments on commit 181a49b

Please sign in to comment.