pytwitcherapi.chat.message.Tag

class pytwitcherapi.chat.message.Tag(name, value=None, vendor=None)[source]

Bases: object

An irc v3 tag

Specification for tags. A tag will associate metadata with a message.

To get tags in twitch chat, you have to specify it in the `capability negotiation<http://ircv3.net/specs/core/capability-negotiation-3.1.html>`_.

__init__(name, value=None, vendor=None)[source]

Initialize a new tag called name

Parameters:
  • name (str) – The name of the tag
  • value (str | None) – The value of a tag
  • vendor (str | tag) – the vendor for vendor specific tags
Raises:

None

Methods

__init__(name[, value, vendor]) Initialize a new tag called name
from_str(tagstring) Create a tag by parsing the tag of a message
classmethod from_str(tagstring)[source]

Create a tag by parsing the tag of a message

Parameters:tagstring (str) – A tag string described in the irc protocol
Returns:A tag
Return type:Tag
Raises:None