# "Error: No response from Twitch." when moderating

**URL:** <https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304>\
**Category:** Chat and IRC\
**Created:** [March 3, 2024, 1:03am UTC](https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304 "2024-03-03T01:03:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azerius](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Azerius](https://discuss.dev.twitch.com/u/Azerius)\
**Post date:** [March 3, 2024, 1:03am UTC](https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304/1 "2024-03-03T01:03:52Z")

</div>

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](https://twitchapps.com/tmi/). 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:

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

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

client.connect();

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

        // DELETE MESSAGE
        client.deletemessage(channel, states.id).then(data => {
            console.log(data);
        }).catch(err => {
            console.log(err);
        })

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

client.on('connected', () => {
    console.log('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?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [March 3, 2024, 1:04am UTC](https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304/2 "2024-03-03T01:04:48Z")

</div>

> [@Azerius](#):
>
> 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](https://dev.twitch.tv/docs/api/reference/#ban-user)

---

<div class="post-metadata">

**Author:** ![Azerius](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Azerius](https://discuss.dev.twitch.com/u/Azerius)\
**Post date:** [March 3, 2024, 1:13am UTC](https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304/3 "2024-03-03T01:13:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [April 2, 2024, 1:13am UTC](https://discuss.dev.twitch.com/t/error-no-response-from-twitch-when-moderating/56304/4 "2024-04-02T01:13:37Z")

</div>

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