mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
feat(Partials): add DMChannel/MessageReaction#fetch() and Parti… (#3261)
* add DMChannel#fetch() & Action#getChannel({recipients})
* ref for MessageReaction partial
* typings
* add PartialTypes.REACTION
* accommodate for fully removed reactions
* fix incorrect wording and typo
* typings: MessageReaction#count is nullable
* typings: mark MessageReaction#partial as readonly
Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>
* fix(User): fetch dm channel if cached one is partial
* docs: add missing comma
Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
8
typings/index.d.ts
vendored
8
typings/index.d.ts
vendored
@@ -653,6 +653,7 @@ declare module 'discord.js' {
|
||||
public messages: MessageStore;
|
||||
public recipient: User;
|
||||
public readonly partial: boolean;
|
||||
public fetch(): Promise<DMChannel>;
|
||||
}
|
||||
|
||||
export class Emoji extends Base {
|
||||
@@ -1091,11 +1092,13 @@ declare module 'discord.js' {
|
||||
constructor(client: Client, data: object, message: Message);
|
||||
private _emoji: GuildEmoji | ReactionEmoji;
|
||||
|
||||
public count: number;
|
||||
public count: number | null;
|
||||
public readonly emoji: GuildEmoji | ReactionEmoji;
|
||||
public me: boolean;
|
||||
public message: Message;
|
||||
public readonly partial: boolean;
|
||||
public users: ReactionUserStore;
|
||||
public fetch(): Promise<MessageReaction>;
|
||||
public toJSON(): object;
|
||||
}
|
||||
|
||||
@@ -2452,7 +2455,8 @@ declare module 'discord.js' {
|
||||
type PartialTypes = 'USER'
|
||||
| 'CHANNEL'
|
||||
| 'GUILD_MEMBER'
|
||||
| 'MESSAGE';
|
||||
| 'MESSAGE'
|
||||
| 'REACTION';
|
||||
|
||||
type PresenceStatus = ClientPresenceStatus | 'offline';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user