# Blacklist / Detect regex for /me command

**URL:** <https://discuss.dev.twitch.com/t/blacklist-detect-regex-for-me-command/30710>\
**Category:** Chat and IRC\
**Created:** [March 3, 2021, 8:59pm UTC](https://discuss.dev.twitch.com/t/blacklist-detect-regex-for-me-command/30710 "2021-03-03T20:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HedgeWizardly](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/hedgewizardly/32/12137_2.png) [@HedgeWizardly](https://discuss.dev.twitch.com/u/HedgeWizardly)\
**Post date:** [March 3, 2021, 8:59pm UTC](https://discuss.dev.twitch.com/t/blacklist-detect-regex-for-me-command/30710/1 "2021-03-03T20:59:57Z")

</div>

Hi there!

Is there a valid regex for the /me command that bots (such as nightbot) can pick up?

I’ve been doing loads of searching trying to find a solution to this, but essentially I’d like to either get nightbot to be able to blacklist usage of the /me command, OR look into creating my own bot that can at least respond to usage of the /me command.

The best lead I found so far was by @matt_thomas, here; [The /me command - #5 by matt\_thomas](https://discuss.dev.twitch.com/t/the-me-command/21543/5)?

> You could try adding this string as a ban word to a bot.
> 
> Unicode character  
> \x{1} - soh start of heading
> 
> this regex would match an emote text from ‘/me’
> 
> > (x{1}ACTION)(.\*)(\x{1})

And the nightbot documentation claims it can blacklist regex, but I cannot for the life of me get it to work.

[https://docs.nightbot.tv/spam-protection/blacklist](https://docs.nightbot.tv/spam-protection/blacklist)

Am I doing it wrong? Is it just nightbot that isn’t capable of managing this? Or is it impossible for any bots / APIs to do?

Disclaimer: I am a total novice to this sort of stuff. I’m a fast learner, but I’m very much a beginner in this territory, so apologies if anything I said is monumentally stupid sounding x)

---

<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, 2021, 9:02pm UTC](https://discuss.dev.twitch.com/t/blacklist-detect-regex-for-me-command/30710/2 "2021-03-03T21:02:03Z")

</div>

> <https://github.com/BarryCarlyon/twitch_misc/blob/master/chat/chat.js#L51>

is the regex I use.

refer to the file on _how_ it’s implemented since this regex runs after another regex/some IRC parsing from raw IRC

---

<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, 2021, 9:02pm UTC](https://discuss.dev.twitch.com/t/blacklist-detect-regex-for-me-command/30710/3 "2021-04-02T21:02:05Z")

</div>

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