Made the test notification not show in chat

This commit is contained in:
Norbi Peti 2016-12-22 20:29:08 +01:00
parent 2053b7f508
commit 03540b430c

View file

@ -208,8 +208,8 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
e2.printStackTrace();
}
try {
return channel
.sendMessage(Test ? "*The following message is from a test server*\n" + message : message);
return channel.sendMessage(Test && channel != chatchannel
? "*The following message is from a test server*\n" + message : message);
} catch (RateLimitException e) {
try {
Thread.sleep(e.getRetryDelay());