Fix trailing stopping strings removal

This commit is contained in:
Cohee 2023-12-01 18:55:11 +02:00
parent bb9d302c3a
commit 6b348f6128

View File

@ -4399,7 +4399,7 @@ function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncomplete
for (const stoppingString of stoppingStrings) {
if (stoppingString.length) {
for (let j = stoppingString.length - 1; j > 0; j--) {
for (let j = stoppingString.length; j > 0; j--) {
if (getMessage.slice(-j) === stoppingString.slice(0, j)) {
getMessage = getMessage.slice(0, -j);
break;