Skip to content

Commit

Permalink
fix(Typings): client message event should not emit PartialMessa… (#3983)
Browse files Browse the repository at this point in the history
* fix(Typings): client message event should not emit PartialMessage

* Update typings/index.d.ts

Co-Authored-By: Jyguy <jskekkx@gmail.com>

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: Jyguy <jskekkx@gmail.com>
  • Loading branch information
3 people authored Mar 23, 2020
1 parent 5da734c commit f2fdb93
Showing 1 changed file with 17 additions and 32 deletions.
49 changes: 17 additions & 32 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ declare module 'discord.js' {
guildUpdate: [Guild, Guild];
inviteCreate: [Invite];
inviteDelete: [Invite];
message: [Message | PartialMessage];
message: [Message];
messageDelete: [Message | PartialMessage];
messageReactionRemoveAll: [Message | PartialMessage];
messageReactionRemoveEmoji: [MessageReaction];
Expand Down Expand Up @@ -2784,19 +2784,14 @@ declare module 'discord.js' {
[K in keyof Omit<
T,
'client' | 'createdAt' | 'createdTimestamp' | 'id' | 'partial' | 'fetch' | O
>]: // tslint:disable-next-line:ban-types
T[K] extends Function ? T[K] : T[K] | null;
>]: T[K] extends Function ? T[K] : T[K] | null; // tslint:disable-line:ban-types
};

interface PartialDMChannel extends Partialize<DMChannel,
'lastMessage' |
'lastMessageID' |
'messages' |
'recipient' |
'type' |
'typing' |
'typingCount'
> {
interface PartialDMChannel
extends Partialize<
DMChannel,
'lastMessage' | 'lastMessageID' | 'messages' | 'recipient' | 'type' | 'typing' | 'typingCount'
> {
lastMessage: null;
lastMessageID: undefined;
messages: MessageManager;
Expand All @@ -2820,16 +2815,11 @@ declare module 'discord.js' {
}[];
}

interface PartialGuildMember extends Partialize<GuildMember,
'bannable' |
'displayColor' |
'displayHexColor' |
'displayName' |
'guild' |
'kickable' |
'permissions' |
'roles'
> {
interface PartialGuildMember
extends Partialize<
GuildMember,
'bannable' | 'displayColor' | 'displayHexColor' | 'displayName' | 'guild' | 'kickable' | 'permissions' | 'roles'
> {
readonly bannable: boolean;
readonly displayColor: number;
readonly displayHexColor: string;
Expand All @@ -2842,16 +2832,11 @@ declare module 'discord.js' {
readonly roles: GuildMember['roles'];
}

interface PartialMessage extends Partialize<Message,
'attachments' |
'channel' |
'deletable' |
'editable' |
'mentions' |
'pinnable' |
'system' |
'url'
> {
interface PartialMessage
extends Partialize<
Message,
'attachments' | 'channel' | 'deletable' | 'editable' | 'mentions' | 'pinnable' | 'system' | 'url'
> {
attachments: Message['attachments'];
channel: Message['channel'];
readonly deletable: boolean;
Expand Down

0 comments on commit f2fdb93

Please sign in to comment.