Fixed clean

This commit is contained in:
Essem 2021-08-05 13:03:44 -05:00
parent 24fe0941c3
commit c0974e2d49
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 132 additions and 132 deletions

View file

@ -13,7 +13,7 @@ const optionalReplace = (token) => {
// clean(text) to clean message of any private info or mentions
exports.clean = async (text) => {
if (text && text.constructor.name == "Promise")
if (text && text.constructor && text.constructor.name == "Promise")
text = await text;
if (typeof text !== "string")
text = util.inspect(text, { depth: 1 });