Something is very strange about your IRC system

Collecting room state
{ tags: { msg_id: 'msg_banned' },
  command: 'NOTICE',
  message: 'You are permanently banned from talking in barrycarlyon.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
@msg-id=msg_banned :tmi.twitch.tv NOTICE #barrycarlyon :You are permanently banned from talking in barrycarlyon.

Works fine for me

    ws = new WebSocket('wss://irc-ws.chat.twitch.tv');

    ws.on('open', () => {
        ws.send('PASS oauth:' +  secrets.access_token);
        ws.send('NICK ' +  bot_name);

        ws.send('CAP REQ :twitch.tv/commands');
        ws.send('CAP REQ :twitch.tv/tags');

        ws.send('JOIN #' + channel_name);
    }).on('error', (err) => {
        console.log(err);
    });

Javascript

after JOIN message send

ws.send('PRIVMSG ' + room + ' :Rejoined');

Response is the above notice

I can cuase the rate limit error if I try spamming a message

{ tags: { msg_id: 'msg_banned' },
  command: 'NOTICE',
  message: 'You are permanently banned from talking in barrycarlyon.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }
{ tags: { msg_id: 'msg_ratelimit' },
  command: 'NOTICE',
  message:
   'Your message was not sent because you are sending messages too quickly.',
  user: false,
  room: '#barrycarlyon',
  action: false,
  score: 0 }