fix: sendSlash search failure (>25 bot)

This commit is contained in:
March 7th
2022-09-11 09:39:57 +07:00
parent d1382823fe
commit fe1f9911c5
4 changed files with 17 additions and 27 deletions

View File

@@ -229,12 +229,12 @@ class User extends Base {
}
if ('premium_type' in data) {
const nitro = NitroType[data.premium_type];
const nitro = NitroType[data.premium_type ?? 0];
/**
* Nitro type of the user.
* @type {NitroType}
*/
this.nitroType = nitro ?? `UNKNOWN_${data.premium_type}`;
this.nitroType = nitro ?? `UNKNOWN_TYPE_${data.premium_type}`;
}
if ('guild_member_profile' in data && 'guild_member' in data) {