diff --git a/packages/discord.js/src/structures/User.js b/packages/discord.js/src/structures/User.js index e48fd0293ab3..33f8e66838fd 100644 --- a/packages/discord.js/src/structures/User.js +++ b/packages/discord.js/src/structures/User.js @@ -1,6 +1,5 @@ 'use strict'; -const process = require('node:process'); const { userMention } = require('@discordjs/builders'); const { calculateUserDefaultAvatarIndex } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); @@ -8,8 +7,6 @@ const Base = require('./Base'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const UserFlagsBitField = require('../util/UserFlagsBitField'); -let tagDeprecationEmitted = false; - /** * Represents a user on Discord. * @implements {TextBasedChannel} @@ -209,14 +206,8 @@ class User extends Base { * if they're using the legacy username system * @type {?string} * @readonly - * @deprecated Use {@link User#username} instead. */ get tag() { - if (!tagDeprecationEmitted) { - process.emitWarning('User#tag is deprecated. Use User#username instead.', 'DeprecationWarning'); - tagDeprecationEmitted = true; - } - return typeof this.username === 'string' ? this.discriminator === '0' ? this.username diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 026d487a17ff..58545ef8249f 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3067,7 +3067,6 @@ export class User extends PartialTextBasedChannel(Base) { public id: Snowflake; public get partial(): false; public system: boolean; - /** @deprecated Use {@link User#username} instead. */ public get tag(): string; public username: string; public avatarURL(options?: ImageURLOptions): string | null;