Skip to content

Commit

Permalink
Merge pull request #7 from Tzesh/versionControlandUpdateFix
Browse files Browse the repository at this point in the history
a major bug that prevents vcs and update has been fixed v3.02 -> v3.03
  • Loading branch information
Tzesh committed Apr 5, 2023
2 parents 4238ec0 + 71f98de commit 983ec7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ dependencies {

compileJava.options.encoding = 'UTF-8'
mainClassName = 'com.tzesh.tzebot.Main'
version '3.02'
version '3.03'
4 changes: 2 additions & 2 deletions src/main/java/com/tzesh/tzebot/essentials/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Config {
public static Map<Long, HashMap<Long, Long>> MUSICCHANNELS = new HashMap<>(); // Music channels that are created and initialized.
public static Map<Long, Integer> VOLUMES = new HashMap<>(); // Volumes of the servers default is 50%
public static Map<Long, Long> CHANNELCREATED = new HashMap<>(); // Music channels that are created but either initialized or not. It's important value for preventing some kind of abusing of channel creation.
public static double currentVersion = 3.02; // Check if there's an update or not.
public static double currentVersion = 3.03; // Check if there's an update or not.
public static String downloadURL = ""; // to download the latest release

public static String get(String key) {
Expand Down Expand Up @@ -128,7 +128,7 @@ public static boolean versionControl() { // check if there is an update or not
URL url = new URL("https://api.github.com/repos/tzesh/TzeBot/releases/latest");
JSONTokener tokener = new JSONTokener(url.openStream());
JSONObject release = new JSONObject(tokener);
String tagName = release.getString("tag_name");
String tagName = release.getString("tag_name").replace("v", "");
JSONArray assets = release.getJSONArray("assets");
JSONObject obj1 = (JSONObject) assets.get(0);
downloadURL = obj1.get("browser_download_url").toString();
Expand Down

0 comments on commit 983ec7d

Please sign in to comment.