Twitch.tv !elo and !rank commands

Hi there, some of you may have seen me in twitch chat as blobiciously, I edited some elo and rank nightbot commands to check data from aoe2.net. A bunch of streamers have them already implemented but I will post them here so they are easier to find for other streamers.

Features:
- Without argument write hardcoded streamer's elo and rank. (!elo)
- With argument write argument's elo and rank. (!elo theviper)
- Error code "no response" if hardcoded call fails.
- Error code "Error: User not found" if argumented call fails.
- Can handle chinese characters due to use of querystring.
- (Optional) can check for steam id in case you are not on top of the search (necessary for short names like Inc!=Vinch )

Notes:
- They can also poop out things like winrate and streak, if you want you can fiddle with that, just make sure to stay under 500 character limit of twitch chat. Or ask me. - Nightbot has around a 5 second timer for using the same command, sometimes it takes a bit longer. - Sometimes the hardcoded call does fail, but should not happen often, error catch is included just in case.

Here they are without the steamid check (just change the hardcoded name to your aoe2 ign):
https://pastebin.com/LV4z0D3R

and then with the steamid check, this one is a bit closer to character limit (change hardcoded name AND steam id to yours):
https://pastebin.com/GDgKfNpj

Happy ny and as always: joejoe!
<3

submitted by /u/ThislsWholAm
[link] [comments]

from newest submissions : aoe2 https://ift.tt/2Qeuuj1
No comments

No comments :

Post a Comment