diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 43d8c6524b3c..fec3f2d7d1d2 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -1,7 +1,6 @@ 'use strict'; const { Endpoints } = require('../util/Constants'); -const Permissions = require('../util/Permissions'); const Base = require('./Base'); /** @@ -92,18 +91,6 @@ class Invite extends Base { return this.createdTimestamp ? new Date(this.createdTimestamp) : null; } - /** - * Whether the invite is deletable by the client user - * @type {boolean} - * @readonly - */ - get deletable() { - const guild = this.guild; - if (!guild || !this.client.guilds.has(guild.id)) return false; - return this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false) || - guild.me.permissions.has(Permissions.FLAGS.MANAGE_GUILD); - } - /** * The timestamp the invite will expire at * @type {?number} diff --git a/typings/index.d.ts b/typings/index.d.ts index f6488599df99..535295d1ff9c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -615,8 +615,7 @@ declare module 'discord.js' { constructor(client: Client, data: object); public channel: GuildChannel; public code: string; - public readonly deletable: boolean; - public readonly createdAt: Date | null; + public readonly createdAt: Date; public createdTimestamp: number | null; public readonly expiresAt: Date | null; public readonly expiresTimestamp: number | null;