How to make an update checker with Reqn and github?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Aidanete

Active Member
Apr 11, 2017
139
10
0
I see that Reqn can be used for this with github, and I don't know how to do it. Can anyone help me?
 
here's an example of what i did in my skript.
code_language.skript:
on load:
    send a "GET" request to "https://raw.githubusercontent.com/ShaneBeee/RandomTP/master/version"
    set {_t} to last http response
    set {_j} to {_t}'s body
    set {_v::*} to {_j} split at "|"
    send "&7[&a&lRTP&7] - &2Loaded successfully" to console
    if "{@version}" is not equal to "%{_v::2}%":
        send "&7[&a&lRandomTP&7] - &2Running version: {@version}" to console
        send "&7[&a&lRandomTP&7] - &cUpdate available, version: %{_v::2}%" to console
    else:
        send "&7[&a&lRandomTP&7] - &2Running current version: {@version}" to console
Obviously point the url to your url, and change the name of your stuff in there,
I also have an option at the top of my skript for the version that checks against the website {@version}
 
here's an example of what i did in my skript.
code_language.skript:
on load:
    send a "GET" request to "https://raw.githubusercontent.com/ShaneBeee/RandomTP/master/version"
    set {_t} to last http response
    set {_j} to {_t}'s body
    set {_v::*} to {_j} split at "|"
    send "&7[&a&lRTP&7] - &2Loaded successfully" to console
    if "{@version}" is not equal to "%{_v::2}%":
        send "&7[&a&lRandomTP&7] - &2Running version: {@version}" to console
        send "&7[&a&lRandomTP&7] - &cUpdate available, version: %{_v::2}%" to console
    else:
        send "&7[&a&lRandomTP&7] - &2Running current version: {@version}" to console
Obviously point the url to your url, and change the name of your stuff in there,
I also have an option at the top of my skript for the version that checks against the website {@version}
Was definitely not made by me.
 
here's an example of what i did in my skript.
code_language.skript:
on load:
    send a "GET" request to "https://raw.githubusercontent.com/ShaneBeee/RandomTP/master/version"
    set {_t} to last http response
    set {_j} to {_t}'s body
    set {_v::*} to {_j} split at "|"
    send "&7[&a&lRTP&7] - &2Loaded successfully" to console
    if "{@version}" is not equal to "%{_v::2}%":
        send "&7[&a&lRandomTP&7] - &2Running version: {@version}" to console
        send "&7[&a&lRandomTP&7] - &cUpdate available, version: %{_v::2}%" to console
    else:
        send "&7[&a&lRandomTP&7] - &2Running current version: {@version}" to console
Obviously point the url to your url, and change the name of your stuff in there,
I also have an option at the top of my skript for the version that checks against the website {@version}

Don't worry, I did that. My API will have an update checker. :emoji_grinning:
 
Status
Not open for further replies.