From f4772274ac458ea2d3aac7b118c0aa6751799d4f Mon Sep 17 00:00:00 2001 From: Supositware Date: Sat, 10 Sep 2022 09:37:06 +0200 Subject: [PATCH] Replace deprecated substr with substring --- commands/fun/tweet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/tweet.js b/commands/fun/tweet.js index 6cceced..09c819d 100644 --- a/commands/fun/tweet.js +++ b/commands/fun/tweet.js @@ -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);