Solved GitHub Download File Script Optimization

  • 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 community!

    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.

thaumiel

Member
Feb 25, 2020
1
0
0
I haven't tested this, but it's my first script using download file, the goal of it is to allow my devs to access a script file without having console access, and have it automatically update it to the server with a command. So, I'm looking for any errors or ways to optimize it as it is currently untested and somewhat rushed.

Code:
command /testupdate:
  trigger:
    announce "&5update"
    if file "plugins/skript/scripts/core.sk" doesn't exist:
      download file from "githubrawlinkthatdoesntexist.com" to file "plugins/skript/scripts/core.sk"
      announce "&5updated"
    else:
      delete file "plugins/skript/scripts/core.sk"
      download file from "githubrawlinkthatdoesntexist.com" to file "plugins/skript/scripts/core.sk'
      announce "&5updated"
 
Status
Not open for further replies.