0

For example

My message:

```js

Hello

```

I wanna make bot ignore ```js and ``` and send the same message

Bot message: Hello

Any javascript function to do this?

1
  • Please elaborate on your question. Do you want something that only ignores ```js and ``` or also other filters? Show us what you have tried so far, what problems did you encounter, what is the actual issue you want fixed? Right now you seem to be asking for someone to write some code for you. Stack Overflow is a question and answer site, not a code-writing service. Please see here to learn how to write effective questions.
    – T. Dirks
    Oct 8, 2020 at 12:55

1 Answer 1

0

You could use String.prototype.replace()

message.channel.send(message.content.replace(/```(\w+\n)?/g, ''));

pic

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.