From 016526486cff91669b4459bd5e4aec40ccc9e734 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 2 Feb 2018 01:41:05 +0100 Subject: [PATCH] enhancement(Activity): add toString method (#2313) --- src/structures/Presence.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 535c7d11d..054e92195 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -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() { return Object.assign(Object.create(this), this); }