Fixed clean
This commit is contained in:
parent
24fe0941c3
commit
c0974e2d49
2 changed files with 132 additions and 132 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue