From 9383f5ea0c5f48783fe028d3fccb025612220132 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 23 Dec 2016 23:06:23 +0100 Subject: [PATCH] Moved update msgs to <#219530035365675010> #coffee-table --- src/main/java/buttondevteam/discordplugin/DiscordPlugin.java | 5 ++++- .../discordplugin/listeners/AutoUpdaterListener.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java b/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java index eae781b..2a2b622 100644 --- a/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java +++ b/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java @@ -78,6 +78,7 @@ public class DiscordPlugin extends JavaPlugin implements IListener { public static IChannel issuechannel; public static IChannel botroomchannel; public static IChannel officechannel; + public static IChannel coffeechannel; public static IGuild mainServer; public static IGuild devServer; @@ -98,6 +99,7 @@ public class DiscordPlugin extends JavaPlugin implements IListener { issuechannel = devServer.getChannelByID("219643416496046081"); // server-issues botroomchannel = devServer.getChannelByID("239519012529111040"); // bot-room officechannel = devServer.getChannelByID("219626707458457603"); // developers-office + coffeechannel = devServer.getChannelByID("219530035365675010"); // coffee-table dc.changeStatus(Status.game("on TBMC")); } else { botchannel = devServer.getChannelByID("239519012529111040"); // bot-room @@ -106,7 +108,8 @@ public class DiscordPlugin extends JavaPlugin implements IListener { botroomchannel = botchannel;// bot-room issuechannel = botchannel; // bot-room chatchannel = devServer.getChannelByID("248185455508455424"); // minecraft_chat_test - officechannel = devServer.getChannelByID("219626707458457603"); // developers-office + officechannel = botchannel; // bot-room + coffeechannel = botchannel; // bot-room dc.changeStatus(Status.game("testing")); } Bukkit.getScheduler().runTaskAsynchronously(this, () -> sendMessageToChannel(chatchannel, "", diff --git a/src/main/java/buttondevteam/discordplugin/listeners/AutoUpdaterListener.java b/src/main/java/buttondevteam/discordplugin/listeners/AutoUpdaterListener.java index 56551ed..541815b 100644 --- a/src/main/java/buttondevteam/discordplugin/listeners/AutoUpdaterListener.java +++ b/src/main/java/buttondevteam/discordplugin/listeners/AutoUpdaterListener.java @@ -22,7 +22,7 @@ public class AutoUpdaterListener implements IListener { String branch = title.substring(title.indexOf(':') + 1, title.indexOf(']')); String project = title.substring(title.indexOf('[') + 1, title.indexOf(':')); if (branch.equals("master") || (TBMCCoreAPI.IsTestServer() && branch.equals("dev")) - && TBMCCoreAPI.UpdatePlugin(project, new DiscordSender(null, DiscordPlugin.chatchannel), branch) + && TBMCCoreAPI.UpdatePlugin(project, new DiscordSender(null, TBMCCoreAPI.IsTestServer()?DiscordPlugin.chatchannel:DiscordPlugin.coffeechannel), branch) && (!TBMCCoreAPI.IsTestServer() || !branch.equals("master"))) try { event.getMessage().addReaction(DiscordPlugin.DELIVERED_REACTION);