Compare commits

..
1 Commits
Author SHA1 Message Date
John Grosh c5a583b96f update deps and deal with discords new ratelimits 2020-05-30 13:26:06 -04:00
2 changed files with 8 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
<dependency>
<groupId>com.sedmelluq</groupId>
<artifactId>lavaplayer</artifactId>
<version>1.3.46</version>
<version>1.3.49</version>
</dependency>
<dependency>
<groupId>com.sedmelluq</groupId>
@@ -29,6 +29,7 @@ import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.Message;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.exceptions.PermissionException;
import net.dv8tion.jda.core.exceptions.RateLimitedException;
/**
*
@@ -119,12 +120,13 @@ public class NowplayingHandler
{
try
{
if(wait)
tchan.getManager().setTopic(text).complete();
else
tchan.getManager().setTopic(text).queue();
// normally here if 'wait' was false, we'd want to queue, however,
// new discord ratelimits specifically limiting changing channel topics
// mean we don't want a backlog of changes piling up, so if we hit a
// ratelimit, we just won't change the topic this time
tchan.getManager().setTopic(text).complete(wait);
}
catch(PermissionException ignore) {}
catch(PermissionException | RateLimitedException ignore) {}
}
}
}