mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
Add Message.toString
This commit is contained in:
parent
d7bcf9564f
commit
ce6cb626dc
2 changed files with 12 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -366,6 +366,17 @@ class Message {
|
||||||
|
|
||||||
return equal;
|
return equal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When concatenated with a string, this automatically concatenates the Message's content instead of the object.
|
||||||
|
* @returns {string}
|
||||||
|
* @example
|
||||||
|
* // logs: Message: This is a message!
|
||||||
|
* console.log(`Message: ${message}`);
|
||||||
|
*/
|
||||||
|
toString() {
|
||||||
|
return this.content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Message;
|
module.exports = Message;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue