Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmi = require("tmi.js");
- var options = {
- options: {
- debug: true
- },
- connection: {
- cluster: "aws",
- reconnect: true
- },
- identity: {
- username: "expired_suzie",
- password: "oauth:n6vihcpb6e9h3imig3mh5zfltdayig"
- },
- channels: ["#twitchplayspokemon"]
- };
- var client = new tmi.client(options);
- client.connect();
- client.on("message", function (channel, userstate, message, self) {
- if(message.includes("started playing on the red")) {
- if(userstate["display-name"] === "tpp"){
- setTimeout(function() {
- client.say("#twitchplayspokemon", ".w tpp pinball t2");
- }, 5000);
- }
- else return;
- }
- if(message.includes("started playing on the gold")) {
- if(userstate["display-name"] === "tpp"){
- setTimeout(function() {
- client.say("#twitchplayspokemon", ".w tpp pinball t2");
- }, 5000);
- }
- else return;
- }
- if(message.includes("started playing on the silver")) {
- if(userstate["display-name"] === "tpp"){
- setTimeout(function() {
- client.say("#twitchplayspokemon", ".w tpp pinball t1");
- }, 5000);
- }
- else return;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement