#Chat Filter help

1 messages · Page 1 of 1 (latest)

oblique fable
#

I'm trying to make a chat filter, so if someone says a slur they get muted.
I have this for the onchat event

on chat:
  set {_check} to uncolored message
  replace all " " in {_check} with ""
  if {_check} contains {-ChatNoList::*}:
    cancel event

and for the other part I have

on load:
  set {-ChatNWords::*} to "words" #obviously not going to put them in here
  set {-ChatRWords::*} to "words"
  set {-ChatFWords::*} to "words" #no the f word isnt f**k

  set {-ChatNoList::*} to "StarterWord"
  add {-ChatRWords::*} to {-ChatNoList::*}

When I do it like this it doesnt work for the on chat, it doesnt pick it up
But if I do it like this, it does

set {-ChatNoList::*} to "Word1","Word2" and "Word3" #etc

I even tried

loop {-ChatRWords::*}:
  add loop-value to {-ChatNoList::*}

But that doesnt work either

strong ivy
#

bruh

#
 if message contains "bad word":
  cancel event
  send "you poopie head you cant say that!"```
oblique fable
#

yeah I know, but I was putting them in a list

#

the on chat event, how I have set up works if I set the list up like this

set {-ChatNoList::*} to "Word1","Word2" and "Word3"

but if I try doing the loop or add the other lists to it, it doesnt work

minor dune
#

So whats the issue?

oblique fable
#

I want the words in different lists, that way they can get different mute times.

set {-ChatRWords::*} to "Word" and "Word"
set {-ChatNoList::*} to "StarterWord" #to set the list

add {-ChatRWords::*} to {-ChatNoList::*}

but when I do it like that, it doesnt work for the on chat event

#

or doing it like this

loop {-ChatRWords::*}:
  add loop-value to {-ChatNoList::*}

also doesnt work for the onchat event

#

which the goal on chat event will look like

on chat:
  set {_check} to uncolored message
  replace all " " in {_check} with ""
  if {_check} contains {-ChatNoList::*}:
    cancel event
    if {_check} contains {-ChatRWord::*}:
      #mute for 15h
    elseif {_check} contains {-ChatFWord::*}:
      #mute for 12h
simple cobalt
#

check if the list contains the message

#

not the message contains the list

#

or loop every value of the list, then check if the message contains that loop-value

minor dune
#

Have you debugged? Which condition fails?

minor dune
oblique fable