# PRIVMSG #\<channel\> :/ban \<user\> \<reason\> doesn't seem to work?

**URL:** <https://discuss.dev.twitch.com/t/privmsg-channel-ban-user-reason-doesnt-seem-to-work/47420>\
**Category:** Chat and IRC\
**Created:** [September 16, 2023, 12:07pm UTC](https://discuss.dev.twitch.com/t/privmsg-channel-ban-user-reason-doesnt-seem-to-work/47420 "2023-09-16T12:07:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![romeehkoning](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@romeehkoning](https://discuss.dev.twitch.com/u/romeehkoning)\
**Post date:** [September 16, 2023, 12:07pm UTC](https://discuss.dev.twitch.com/t/privmsg-channel-ban-user-reason-doesnt-seem-to-work/47420/1 "2023-09-16T12:07:03Z")

</div>

Hey guys, i am working on a bot that bans a list of users.

 ![Capture](https://d2opxh93rbxzdn.cloudfront.net/original/3X/f/c/fc8390d0c7ee7469aac0ab04885606c3fd2adf49.png)

the console.log on line 56 gives me exactly the result that i would expect.  
the code on line 55 is shown in my chat correctly, but when i add ‘/ban’ in front of it will not show in the chat, and it will not ban the given user.

can anybody tell me what i did wrong?

---

<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:** [September 16, 2023, 12:08pm UTC](https://discuss.dev.twitch.com/t/privmsg-channel-ban-user-reason-doesnt-seem-to-work/47420/2 "2023-09-16T12:08:32Z")

</div>

Chat commands no longer work via IRC they have been moved to the API

> **[Reference](https://dev.twitch.tv/docs/api/reference/#ban-user)**
>
> Twitch Developer tools and services to integrate Twitch into your development or create interactive experience on twitch.tv.

This was announced and shutdown a while back, with the final shutdown in February

> [@Deprecation of chat commands through IRC](https://discuss.dev.twitch.com/t/deprecation-of-chat-commands-through-irc/40486/1):
>
> Update (2023-02-08): We are implementing a phased shutdown to help developers test whether their applications are affected and make others aware who may not have seen previous communication. The timeline has been added below and the final shutdown date has been updated to to February 24. Twitch Chat and the Twitch API are two essential interfaces that third-party developers rely on to build innovative integrations for broadcasters and their viewers. Historically, there has been an unfortunat…

---

<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:** [October 16, 2023, 12:09pm UTC](https://discuss.dev.twitch.com/t/privmsg-channel-ban-user-reason-doesnt-seem-to-work/47420/3 "2023-10-16T12:09:29Z")

</div>

Closed on October 16, 2023, 12:09pm UTC

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