Only reacting if prod. or not master
So it won't put a checkmark on master commits if updated on a test server
This commit is contained in:
parent
46182fc4ec
commit
972ea865e0
1 changed files with 9 additions and 8 deletions
|
@ -21,8 +21,9 @@ public class AutoUpdaterListener implements IListener<MessageReceivedEvent> {
|
|||
return;
|
||||
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")))
|
||||
if (TBMCCoreAPI.UpdatePlugin(project, new DiscordSender(null, DiscordPlugin.chatchannel), branch))
|
||||
if (branch.equals("master") || (TBMCCoreAPI.IsTestServer() && branch.equals("dev"))
|
||||
&& TBMCCoreAPI.UpdatePlugin(project, new DiscordSender(null, DiscordPlugin.chatchannel), branch)
|
||||
&& (!TBMCCoreAPI.IsTestServer() || !branch.equals("master")))
|
||||
try {
|
||||
event.getMessage().addReaction(DiscordPlugin.DELIVERED_REACTION);
|
||||
} catch (RateLimitException e) { // TODO: Handle
|
||||
|
|
Loading…
Reference in a new issue