mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat(Game): add toString method
Backported from commit: 016526486c
PR: #2313
This commit is contained in:
@@ -73,6 +73,14 @@ class Game {
|
|||||||
return this.type === 1;
|
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
|
* Whether this game is equal to another game
|
||||||
* @param {Game} game The game to compare with
|
* @param {Game} game The game to compare with
|
||||||
|
|||||||
Reference in New Issue
Block a user