CLEARCHAT returning 421 unknown command


So I have been trying to make my irc bot clear chat using raw messages. But I keep receiving this error telling me that the command CLEARCHAT doesn’t exist.

What I am sending:
< CLEARCHAT #mychannel

And what I receive:
[00:43:38] <data> 421 mybotname CLEARCHAT :Unknown command

send ‘.clear’ or ‘/clear’

1 Like

Well yeah, thats the easy way, but what if I wanted to use TMI?

That is. PRIVMSG #channel .clear

1 Like

Just elaborating on what @tournymastercursebot said:

To clear a chat room:
PRIVMSG #channel :/clear

To clear a user (replaces user with message deleted)
PRIVMSG #channel :/timeout user (much more is allowed here, but this is the textbook example)

These commands result in TMI sending a CLEARCHAT message for clients, which then are used to alter the on-screen text.

Should be documented here Let us know if it’s unclear!

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