mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat(*): use enums for consistency and speed (#5843)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
@@ -169,7 +169,7 @@ class Activity {
|
||||
* The type of the activity status
|
||||
* @type {ActivityType}
|
||||
*/
|
||||
this.type = ActivityTypes[data.type] || ActivityTypes[ActivityTypes.indexOf(data.type)];
|
||||
this.type = typeof data.type === 'number' ? ActivityTypes[data.type] : data.type;
|
||||
|
||||
/**
|
||||
* If the activity is being streamed, a link to the stream
|
||||
|
||||
Reference in New Issue
Block a user