Always send info about version
This commit is contained in:
parent
15c99d007a
commit
b26b8a1ded
1 changed files with 9 additions and 8 deletions
|
@ -52,13 +52,6 @@ public class UpdateCommand {
|
||||||
|
|
||||||
if (args.length == 1) { // remember this function is proxied
|
if (args.length == 1) { // remember this function is proxied
|
||||||
updater.getLatestVersion().thenAccept(metadata -> {
|
updater.getLatestVersion().thenAccept(metadata -> {
|
||||||
if (metadata != null) {
|
|
||||||
sender.sendMessage("An update is available!");
|
|
||||||
sender.sendMessage("Giants " + metadata.getLabel() + " released " + formatDate(metadata.getTimestamp()));
|
|
||||||
sendChangelogMessage(sender, metadata.getChangelogUrl());
|
|
||||||
sender.sendMessage("To download: /giants update download");
|
|
||||||
} else {
|
|
||||||
sender.sendMessage("No new updates");
|
|
||||||
updater.getCurrentVersion().thenAccept(metadata2 -> {
|
updater.getCurrentVersion().thenAccept(metadata2 -> {
|
||||||
sender.sendMessage("You're on Giants " + metadata2.getLabel() + " released " + formatDate(metadata2.getTimestamp()));
|
sender.sendMessage("You're on Giants " + metadata2.getLabel() + " released " + formatDate(metadata2.getTimestamp()));
|
||||||
sendChangelogMessage(sender, metadata2.getChangelogUrl());
|
sendChangelogMessage(sender, metadata2.getChangelogUrl());
|
||||||
|
@ -67,6 +60,14 @@ public class UpdateCommand {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (metadata != null) {
|
||||||
|
sender.sendMessage("An update is available!");
|
||||||
|
sender.sendMessage("Giants " + metadata.getLabel() + " released " + formatDate(metadata.getTimestamp()));
|
||||||
|
sendChangelogMessage(sender, metadata.getChangelogUrl());
|
||||||
|
sender.sendMessage("To download: /giants update download");
|
||||||
|
} else {
|
||||||
|
sender.sendMessage("No new updates");
|
||||||
}
|
}
|
||||||
}).exceptionally(e -> {
|
}).exceptionally(e -> {
|
||||||
sender.sendMessage("Error checking for update. See console for details.");
|
sender.sendMessage("Error checking for update. See console for details.");
|
||||||
|
|
Loading…
Reference in a new issue