function psOpen() {
    _event('dev', 'pubsub - connected successfully');
    let frame = {
      type: 'LISTEN',
      nonce: 'listenToTopics',
      data: {
        topics: [
          'channel-bits-events-v1.' + state.channel_id,
          // 'channel-subscribe-events-v1.' + state.channel_id,
          'chat_moderator_actions.' + state.id + '.' + state.channel_id,
          'whispers.' + state.id,
        ],
        auth_token: state.oauth,
      },
    };

    send(JSON.stringify(frame));

    ping();
  }
function psOpen() {
    _event('dev', 'pubsub - connected successfully');
    let frame = {
      type: 'LISTEN',
      nonce: 'listenToTopics',
      data: {
        topics: [
          'channel-bits-events-v1.' + state.channel_id,
          
          'chat_moderator_actions.' + state.id + '.' + state.channel_id,
          'whispers.' + state.id,
        ],
        auth_token: state.oauth,
      },
    };

    send(JSON.stringify(frame));

    ping();
  }
function psOpen ( ) { _event ( 'dev' , 'pubsub - connected successfully' ) ; let frame = { type : 'LISTEN' , nonce : 'listenToTopics' , data : { topics : [ 'channel-bits-events-v1.' + state . channel_id , // 'channel-subscribe-events-v1.' + state.channel_id, 'chat_moderator_actions.' + state . id + '.' + state . channel_id , 'whispers.' + state . id , ] , auth_token : state . oauth , } , } ; send ( JSON . stringify ( frame ) ) ; ping ( ) ; }
https://dev.twitch.tv/docs/v5/guides/PubSub/
https : // dev . twitch . tv / docs / v5 / guides / PubSub /