def get_bot_code(code):
    file = urllib.request.urlopen("https://raw.githubusercontent.com/XenthisX/bot/master/bots/bot.clj").read()
    print(code)
    if (code == 'js'):
        file = urllib.request.urlopen("https://raw.githubusercontent.com/erichahn/wombats-python/master/bots/bottest.js")
        extension = "bottest.js"
    elif(code == 'py'):
        file = urllib.request.urlopen("https://raw.githubusercontent.com/erichahn/wombats-python/master/bots/bottest.py")
        extension = "bottest.py"
    return Parse.run_command(extension, file.read())
Exemple #2
0
def main():
    print("Test")
    Parse.run_command("bottest.js", "console.log(\"Ran bottest.js\")")