mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
+2
-1
@@ -124,7 +124,8 @@ module.exports = class Util {
|
||||
.replace(/"/g, '"')
|
||||
.replace(/<\/?i>/g, '*')
|
||||
.replace(/~!|!~/g, '||');
|
||||
const spoilers = (clean.substr(0, 1997).match(/\|\|/g) || []).length;
|
||||
if (clean.length > 2000) clean = `${clean.substr(0, 1995)}...`;
|
||||
const spoilers = (clean.match(/\|\|/g) || []).length;
|
||||
if (spoilers !== 0 && (spoilers && (spoilers % 2))) clean += '||';
|
||||
return clean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user