mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
enhancement(Activity): add toString method (#2313)
This commit is contained in:
parent
31873eb3a5
commit
016526486c
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue