API Twitch.tv chat commands for streamers

API Twitch.tv chat commands for streamers

in API Development

Posted by: Nekres.1038

Nekres.1038

I wrote a detailed module for the Twitch.tv chat bot Phantombot.

The current chat commands are:
———————
!gw2 setkey [ GW2apiKey ] – Sets a Guild Wars 2 api key. Required permissions: account, wallet, characters, pvp, builds, progression. Created at: https://account.arena.net/applications
!gw2 rank [ integer ] – Displays your current league placement or the best of a season if given.
!gw2 stats [ profession ] – Displays your overall pvp matches played or stats of a profession if given.
(It will calculate and display your W/L ratio and considers wins, losses, byes and desertations – but not forfeits – for the result.)
!gw2 characters/chars – Whispers the names of all your characters.
!gw2 account/acc – Displays general information of your account.
!gw2 wallet/coins/gold/karma – Displays the amount of gold and karma in your possession.
!gw2 world/server – Displays the world & population of the world your’re playing on.
!gw2 guilds – Whispers the name and tag of guilds your’re a member of.
!gw2 fractals/fracs – Displays your current fractal level.
!gw2 wvw – Displays your current WvW level.
!gw2 wiki [ article ] – Returns an official wiki search link for the item specified.
!gw2 build [ game mode ] [ character ] – Returns a gw2tool.net link that will forward to the gw2skills.net build editor which will be adjusted to your current equipped build in a specified game mode on a specified character. (Game modes are: ‘pve’, ‘pvp’, ‘wvw’.) Can also be called with swapped arguments: !gw2 build [ character ] [ game mode ].
!gw2 deathcounter/deaths [ character ] – Toggles a death counter for a specific character and writes its value to ’ /addons/guildwars2/sessiondeaths.txt_ ’ followed by a skull and crossbones symbol ’ ? ‘.
!gw2 goldcounter – Toggles a gold counter and writes initial gold, earnings plus losses to ’ /addons/guildwars2/sessiongold.txt_ ’.
!gw2 coinsformat – Toggles between two different currency formats to display by other functions of this module : ’####.00,00g’ or ‘####g 00s 00c’ (default)
!gw2 birthday/bday – Checks if any of your characters had birthday on the last 3 days.

  • The slash / separates synonyms to choose from!!
  • The brackets [] mark parameters to input! (Ex. ‘!gw2 build [game mode] [character]’ becomes ‘!gw2 build pvp Nekres’)

Install guide & download here: https://community.phantombot.tv/topic/88/guild-wars-2-api-module

A changelog can be taken from within the main file.


For those unfamiliar with Phantombot: I have made a PHP script that’s far from detailed like my Phantombot module, but can return your PvP stats and current equipped build and doesn’t require you to download anything! You can find the setup guide for the PHP version on my github here: https://github.com/Nekress/guildwars2nightbot

Enjoy.

(edited by Nekres.1038)