"Error: No response from Twitch." when moderating

Hi there, I’m trying to use my own account to moderate a Twitch chat with tmi.js, but it seems impossible. I can successfully connect and receive messages from the chat, but I can’t delete a message or time out someone. I get the error: No response from Twitch. directly.

I obtained the OAuth password using this site. I also tried to connect with a token from my application and received it on localhost, but the result was the same.

Additionally, I attempted to connect my bot to another account, and I encountered the same error.

I’m sure to be moderator in the targeted channel, and I’ve also tried with my own channel.

I’m pretty certain that I’m using the correct scopes without missing any. Here are the scopes I used: moderation:read+moderator:manage:banned_users+moderator:manage:chat_messages+channel:bot+channel:moderate+chat:edit+chat:read+user:bot+user:read:chat+user:write:chat

Here is my code:

const tmi = require('tmi.js');

const client = new tmi.client({ identity: { username: 'azeriius', password: 'oauth:XXX' }, channels: ['azeriius'] });


client.on('message', (channel, states, message, isSelf) => {
    if (message === 'test') {

        client.deletemessage(channel, states.id).then(data => {
        }).catch(err => {

        // TIMEOUT
        client.timeout(channel, states.username, 300, 'Test').then(data => {
        }).catch(err => {

client.on('connected', () => {

I also tried to get more information with the event raw_message, and I received this response: @msg-id=unrecognized_cmd :tmi.twitch.tv NOTICE #azeriius :Unrecognized command: /timeout

Someone has an idea please?

Commands moved to the API like two years ago

Please migrate to Reference | Twitch Developers

Ok, I thought it was still possible with tmi.js. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.