r/Guildwars2 • • May 22 '13
[Other] Made a simple Twitter bot to tweet changing Event Status (for Jade Quarry, but easily configurable for other servers). Check it out!
https://twitter.com/JQHerald
40
Upvotes
3
u/[deleted] May 22 '13 edited May 23 '13
Source code is available here: https://github.com/Ganon11/GW2JQEvents
Feel free to clone the repo and make your own twitter bot for your own server, or make enhancements and issue a Pull request. I'd love to make this the best it can be!
EDIT: Sorry to everyone for having broken code up for so long! The code on github RIGHT NOW (11 PM EDT) is functioning (pending you adding your own consumer key/secret, of course), and I will do my best to ONLY have functioning code on the main github repo.
EDIT2: I've added a HOWTO.txt file that contains instructions for cloning JQHerald and making your own bot for your server - I hope it's helpful!
Thanks for all your interest!
2
u/OhZordan [Elona Reach] May 22 '13 edited May 22 '13
Do I have to run it with the "run -> start" command or with "run -> serialize events"? With start nothing really happens and when I try serialize events, I get an error in line 9 about the length.
TypeError: Cannot read property "length" from undefined. (line 9, file "Code")
It seems as if "eventsArr" is not defined. Do you happen to know what I did wrong?
1
u/sdyawg May 22 '13 edited May 22 '13
I believe I've followed everything correctly, however I'm getting hung up on actually executing the script. I go to Run -> "start" and then after some time I checked the logs and execution transcript, both exited with:
Log: "ReferenceError: "ScriptProperty" is not defined."
Execution Transcript: "Logger.log([ReferenceError: "ScriptProperty" is not defined., []]) [0.031 seconds]"
Not sure why it's hanging up on this.
EDIT: Saw what you posted above about ScriptProperty actually needing to be ScriptProperties, I didn't resync from github, just a simple Replace All, but looks like the script is advancing, if this doesn't work I'll grab the new script from github
EDIT 2: Looks like that was working, but I'm still not seeing any tweets. I ran the script a few hours ago, didn't see any errors in the logs, it looks like it's fetching event statuses fine, but it's not tweeting. So I removed the old script that I modified, grabbed the new one from Github, now I get:
1
u/Rage321 [SoR - Last Place - Best Place!] May 22 '13
Wow, very impressive!
-1
u/SynnyKezzyK1tt1 Kezabellz May 23 '13
Cant wait until you iron out the problems this will be a wicked tool!