From 0c7a618f1017bf6cf807562799c606ec72fce140 Mon Sep 17 00:00:00 2001 From: Kyra Date: Mon, 11 Feb 2019 20:33:13 +0100 Subject: [PATCH] cleanup: remove unused members of classes (#3078) * cleanup: Remove unused members of classes * typings: Remove hit from Message --- src/errors/Messages.js | 2 -- src/structures/DMChannel.js | 1 - src/structures/GroupDMChannel.js | 1 - src/structures/Message.js | 6 ------ src/structures/TextChannel.js | 1 - typings/index.d.ts | 1 - 6 files changed, 12 deletions(-) diff --git a/src/errors/Messages.js b/src/errors/Messages.js index 792c2b8b9..443315a7b 100644 --- a/src/errors/Messages.js +++ b/src/errors/Messages.js @@ -81,8 +81,6 @@ const Messages = { PRUNE_DAYS_TYPE: 'Days must be a number', - SEARCH_CHANNEL_TYPE: 'Target must be a TextChannel, DMChannel, GroupDMChannel, or Guild.', - GUILD_CHANNEL_RESOLVE: 'Could not resolve channel to a guild channel.', GUILD_VOICE_CHANNEL_RESOLVE: 'Could not resolve channel to a guild voice channel.', GUILD_CHANNEL_ORPHAN: 'Could not find a parent to this guild channel.', diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index 5549618a2..7c3db02e6 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -59,7 +59,6 @@ class DMChannel extends Channel { get lastMessage() {} get lastPinAt() {} send() {} - search() {} startTyping() {} stopTyping() {} get typing() {} diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 6f9aca390..39fb56468 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -229,7 +229,6 @@ class GroupDMChannel extends Channel { get lastMessage() {} get lastPinAt() {} send() {} - search() {} startTyping() {} stopTyping() {} get typing() {} diff --git a/src/structures/Message.js b/src/structures/Message.js index 1947705ec..310706e15 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -153,12 +153,6 @@ class Message extends Base { type: data.activity.type, } : null; - /** - * Whether this message is a hit in a search - * @type {?boolean} - */ - this.hit = typeof data.hit === 'boolean' ? data.hit : null; - /** * The previous versions of the message, sorted with the most recent first * @type {Message[]} diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 47c8e19c2..a643815e5 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -127,7 +127,6 @@ class TextChannel extends GuildChannel { get lastMessage() {} get lastPinAt() {} send() {} - search() {} startTyping() {} stopTyping() {} get typing() {} diff --git a/typings/index.d.ts b/typings/index.d.ts index 1b1d17fc7..8c606400c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -661,7 +661,6 @@ declare module 'discord.js' { public readonly edits: Message[]; public embeds: MessageEmbed[]; public readonly guild: Guild; - public hit: boolean; public id: Snowflake; public readonly member: GuildMember; public mentions: MessageMentions;