Skip to content

Commit 6ba3d05

Browse files
committed
chore: suggested changes
1 parent 8fd7a2d commit 6ba3d05

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/discord.js/src/structures/User.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ class User extends Base {
155155
/**
156156
* @typedef {Object} UserPrimaryGuild
157157
* @property {?Snowflake} identityGuildId - The id of the user's primary guild
158-
* @property {?boolean} identityEnabled - Whether the user is displaying the primary guild's server tag
159-
* @property {?string} tag - The user's server tag. Limited to 4 characters
160-
* @property {?string} badge - The server tag badge hash
158+
* @property {?boolean} identityEnabled - Whether the user is displaying the primary guild's tag
159+
* @property {?string} tag - The user's guild tag. Limited to 4 characters
160+
* @property {?string} badge - The guild tag badge hash
161161
*/
162162

163163
if (data.primary_guild) {
@@ -277,10 +277,9 @@ class User extends Base {
277277
* @returns {?string}
278278
*/
279279
guildTagBadgeURL(options = {}) {
280-
return (
281-
this.primaryGuild?.badge &&
282-
this.client.rest.cdn.guildTagBadge(this.primaryGuild.identityGuildId, this.primaryGuild.badge, options)
283-
);
280+
return this.primaryGuild?.badge
281+
? this.client.rest.cdn.guildTagBadge(this.primaryGuild.identityGuildId, this.primaryGuild.badge, options)
282+
: null;
284283
}
285284

286285
/**

packages/discord.js/typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3541,7 +3541,7 @@ export class User extends Base {
35413541
public get hexAccentColor(): HexColorString | null | undefined;
35423542
public id: Snowflake;
35433543
public get partial(): false;
3544-
public primaryGuild: UserPrimaryGuild;
3544+
public primaryGuild: UserPrimaryGuild | null;
35453545
public system: boolean;
35463546
public get tag(): string;
35473547
public username: string;

0 commit comments

Comments
 (0)