mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
feat(Game): add toString method
Backported from commit: 016526486c
PR: #2313
This commit is contained in:
parent
15a8e17710
commit
c0ca73a40c
1 changed files with 8 additions and 0 deletions
|
|
@ -73,6 +73,14 @@ class Game {
|
|||
return this.type === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* When concatenated with a string, this automatically returns the game's name instead of the Game object.
|
||||
* @returns {string}
|
||||
*/
|
||||
toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this game is equal to another game
|
||||
* @param {Game} game The game to compare with
|
||||
|
|
|
|||
Loading…
Reference in a new issue