tmi 0.0.4 copy "tmi: ^0.0.4" to clipboard
tmi: ^0.0.4 copied to clipboard

Dart library for the Twitch Messaging Interface. (Twitch.tv)

example/main.dart

import 'package:tmi/tmi.dart' as tmi;

void main() {
  var client = tmi.Client(
    channels: "androidedelvalle",
    secure: true,
  );
  client.connect();

  client.on("message", (channel, userstate, message, self) {
    print("${channel}| ${userstate['display-name']}: ${message}");
  });
  client.on("join", (channel, username, self) {
    if (!self) {
      print("${channel}> ${username} join");
    }
  });
  client.on("raided", (channel, username, viewers, userstate) {
    print("${channel}> === RAID === ${viewers} from ${username}");
  });
  client.on("resub",
      (channel, username, streakMonths, msg, userstate, methods) {
    print("${channel}> CAPO $username por sus $streakMonths!: $msg");
  });
  client.on("subscription", (channel, username, methods, msg, userstate) {
    print("${channel}>>>> NEW SUB: $username");
  });
  client.on("roomstate", (channel, tags) {
    print("${channel} JOINING $tags");
  });
  client.on("pong", (latency) {
    print("pong delayed by $latency");
  });
  client.on("notice", (channel, msgid, message) {
    print("~~~~ $msgid ----> $message");
  });
}
7
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Dart library for the Twitch Messaging Interface. (Twitch.tv)

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

eventify, logger, websok

More

Packages that depend on tmi