Replace deprecated substr with substring
This commit is contained in:
parent
7c39b62d2c
commit
f4772274ac
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ export default {
|
|||
|
||||
if (tweet) {
|
||||
// Detect banned word (Blacklist the user directly)
|
||||
if (wordToCensor.includes(tweet) || wordToCensor.includes(tweet.substr(0, tweet.length - 1)) || wordToCensor.includes(tweet.substr(1, tweet.length))) {
|
||||
if (wordToCensor.includes(tweet) || wordToCensor.includes(tweet.substring(0, tweet.length - 1)) || wordToCensor.includes(tweet.substring(1, tweet.length))) {
|
||||
const body = { type:'tweet', uid: interaction.user.id, reason: 'Automatic ban from banned word.' };
|
||||
Blacklists.create(body);
|
||||
|
||||
|
|
Loading…
Reference in a new issue