Now, the bot react only if the content of the message is a mention to it, without any other content. #1

Merged
KaKi87 merged 3 commits from Ionys320/voice-activity-notify-bot:master into master 2020-07-30 19:09:46 +02:00
Contributor

I discovered that the bot was reacting just by mentionning it, even if they was a message and not just the mention.

I fix it, but maybe my code could be better.

I let you see ^^
Ionys320, aka Arial320

I discovered that the bot was reacting just by mentionning it, even if they was a message and not just the mention. I fix it, but maybe my code could be better. I let you see ^^ Ionys320, aka Arial320
Owner

One question : why ?

One question : why ?
Author
Contributor

image
Because of this: mention the bot in a message make it react after all

![image](/attachments/74b68736-5781-446c-b88d-678478f06b6e) Because of this: mention the bot in a message make it react after all
Owner

Understood.

  • Please use triple equal instead of double equal
  • Please use backtics instead of double quotes
  • Please set clientId at line 9 to be used at lines 47 and 172

Thanks

Understood. * Please use triple equal instead of double equal * Please use backtics instead of double quotes * Please set `clientId` at line 9 to be used at lines 47 and 172 Thanks
Author
Contributor

All done!

All done!
Owner

Please use backtics instead of double quotes

Here is what I meant :

- ('<@!' + clientId + '>')
+ `<@!${clientId}>`

MDN documentation : JavaScript template literals

> Please use backtics instead of double quotes Here is what I meant : ```diff - ('<@!' + clientId + '>') + `<@!${clientId}>` ``` MDN documentation : JavaScript [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
KaKi87 merged commit 807ffb82d2 into master 2020-07-30 19:09:46 +02:00
This repository is archived. You cannot comment on pull requests.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: KaKi87/voice-activity-notify-bot#1
No description provided.