Hey CodingForums and coders!
I'm coding plugin for a website and websites has good APIS to example check when someone joins to chat and to send automatically message: 'Welcome' etc.
So I'm coding /update command to my 'chatbot' and was goin to use $.getScript to get newest, updated script from url and run it again / replacing old code.
So everytime when I send to chat '/update' chatbot will run function update.
What do I need to do to replace the old code with the new code?
Here's something what I tried and I think it's working, or is it?
Also nice add would be to check if olds code version (variable chatBotV) is same as updated, it wont replace it.
// Sends message 'chabot is updated' and get's version from variable chatBotV!
If you need more details comment below...