#how do i cancel my censored messages?

1 messages · Page 1 of 1 (latest)

still canopy
#

i would recommend using dynamic properties so you can keep the censored word instead of every time u reload or take the pack off and back on it will keep the word censored

#

wait no jaylybot?

nimble portalBOT
#
Debug Result

There are 2 errors in this [code](#1210723567180976238 message):

<repl>.js:9:26 - error TS18048: 'data.formValues' is possibly 'undefined'.

9             const cens = data.formValues[0];
                           ~~~~~~~~~~~~~~~

``````ansi
<repl>.js:10:33 - error TS2339: Property 'toLowerCase' does not exist on type 'string | number | boolean'.
  Property 'toLowerCase' does not exist on type 'number'.

10             censoredw.push(cens.toLowerCase());
                                   ~~~~~~~~~~~

still canopy
#

hmm

#

app did work for me

#

do a map instead of some

#

that may work

#

also mc dont need any more censored words

#

and u should also add a replace feature

#

did map work?

still canopy
#

hmm idk sorry

#

i think its not defined for containsCensoredw

abstract lantern
#

Why not try with if(censoredwr.includes(msg.toLowerCase))

still canopy
#

because msg isnt a word its a list of words

#

so in that case

abstract lantern
#

I mean, detect if the list of censured words includes the msg

still canopy
#

const allWords = msg.split(" ");

abstract lantern
#

Mmmmm now I get it

still canopy
#
const allWords = msg.split(" ");

allWords.forEach((w) => {
    if (censoredwr.includes(w)) {
        // Do stuff
    }
}
#

@agile wharf

abstract lantern
#

Yeah, some like that

still canopy
#

that should work im like 99% sure its undefined when ur checking the if statement