nu_plugin_twitch 0.1.0

A Nu Shell plugin providing commands to interact with Twitch IRC and API, therefore making scripting easy.
Documentation

Nu Plugin Twitch

A Nu Shell plugin providing commands to interact with Twitch IRC and API, therefore making scripting possible in Nu Shell.

Examples

The justfile is full of simple examples, as well as some more advanced in the /examples/*.nu files.

Archive a channel chat for auditing

Archiving a chat is available via the just archive-chat {{CHANNEL}} command.

# First start archiving the chat for later use
twitch chat Larandar | into sqlite examples/archive.db -t Larandar

# Now let's get the number of messages of each user per minutes
open examples/archive.db | get Larandar | select sender timestamp |
    insert minutes { $in.timestamp | format date "%Y-%m-%d %H:%M:00.000%Z" } |
    group-by --to-table sender minutes |
    move items messages | update messages { length } |
    sort-by count

Roadmap

MVP

  • Reading messages from IRC
  • Parsing subscription notifications
  • Sending message to IRC
  • OAuth management with twitch auth command to authenticate and store a profile
  • Refreshing OAuth token

Credits