mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
enhancement(Activity): add toString method (#2313)
This commit is contained in:
@@ -134,6 +134,14 @@ class Activity {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When concatenated with a string, this automatically returns the activities's name instead of the Activity object.
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
toString() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
_clone() {
|
_clone() {
|
||||||
return Object.assign(Object.create(this), this);
|
return Object.assign(Object.create(this), this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user