mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
feat: super reactions (#9336)
* feat: super reactions * docs: Touch-up * feat: count super reactions in events * feat: document me_burst property Co-authored-by: Danial Raza <danialrazafb@gmail.com> * feat: document type query for fetching reaction users * fix: cover case when burstColors can be undefined at init of a reaction * Update packages/discord.js/src/structures/MessageReaction.js Co-authored-by: Vlad Frangu <me@vladfrangu.dev> * chore: futureproof so use an object --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Danial Raza <danialrazafb@gmail.com> Co-authored-by: Vlad Frangu <me@vladfrangu.dev> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
26
packages/discord.js/typings/index.d.ts
vendored
26
packages/discord.js/typings/index.d.ts
vendored
@@ -181,6 +181,7 @@ import {
|
||||
APISelectMenuDefaultValue,
|
||||
SelectMenuDefaultValueType,
|
||||
InviteType,
|
||||
ReactionType,
|
||||
} from 'discord-api-types/v10';
|
||||
import { ChildProcess } from 'node:child_process';
|
||||
import { EventEmitter } from 'node:events';
|
||||
@@ -2414,10 +2415,13 @@ export class MessageReaction {
|
||||
private constructor(client: Client<true>, data: RawMessageReactionData, message: Message);
|
||||
private _emoji: GuildEmoji | ReactionEmoji;
|
||||
|
||||
public burstColors: string[] | null;
|
||||
public readonly client: Client<true>;
|
||||
public count: number;
|
||||
public countDetails: ReactionCountDetailsData;
|
||||
public get emoji(): GuildEmoji | ReactionEmoji;
|
||||
public me: boolean;
|
||||
public meBurst: boolean;
|
||||
public message: Message | PartialMessage;
|
||||
public get partial(): false;
|
||||
public users: ReactionUserManager;
|
||||
@@ -2428,6 +2432,10 @@ export class MessageReaction {
|
||||
public valueOf(): Snowflake | string;
|
||||
}
|
||||
|
||||
export interface MessageReactionEventDetails {
|
||||
burst: boolean;
|
||||
}
|
||||
|
||||
export interface ModalComponentData {
|
||||
customId: string;
|
||||
title: string;
|
||||
@@ -5294,8 +5302,16 @@ export interface ClientEvents {
|
||||
messages: ReadonlyCollection<Snowflake, Message | PartialMessage>,
|
||||
channel: GuildTextBasedChannel,
|
||||
];
|
||||
messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
||||
messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
||||
messageReactionAdd: [
|
||||
reaction: MessageReaction | PartialMessageReaction,
|
||||
user: User | PartialUser,
|
||||
details: MessageReactionEventDetails,
|
||||
];
|
||||
messageReactionRemove: [
|
||||
reaction: MessageReaction | PartialMessageReaction,
|
||||
user: User | PartialUser,
|
||||
details: MessageReactionEventDetails,
|
||||
];
|
||||
messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
|
||||
presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
|
||||
ready: [client: Client<true>];
|
||||
@@ -5740,6 +5756,7 @@ export interface FetchMessagesOptions {
|
||||
}
|
||||
|
||||
export interface FetchReactionUsersOptions {
|
||||
type?: ReactionType;
|
||||
limit?: number;
|
||||
after?: Snowflake;
|
||||
}
|
||||
@@ -6475,6 +6492,11 @@ export interface MessageSelectOption {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ReactionCountDetailsData {
|
||||
burst: number;
|
||||
normal: number;
|
||||
}
|
||||
|
||||
export interface SelectMenuComponentOptionData {
|
||||
default?: boolean;
|
||||
description?: string;
|
||||
|
||||
Reference in New Issue
Block a user