UNPKG

darkcord

Version:

A NodeJS Package to interact with Discord API

129 lines 3.2 kB
import { UserDataManager } from "../manager/UserDataManager"; import { AnyClient, DataWithClient } from "../types/index"; import { APIEmoji, APIReaction as RawAPIReaction } from "discord-api-types/v10"; import { Message } from "./Message"; export declare class Emoji { /** * Whether this emoji must be wrapped in colons */ requireColons?: boolean; /** * Whether this emoji is managed */ managed?: boolean; /** * Whether this emoji can be used, may be false due to loss of Server Boosts */ available?: boolean; /** * Emoji name (can be null only in reaction emoji objects) */ name: string | null; /** * Whether this emoji is animated */ animated?: boolean; /** * Emoji id */ id: string | null; rawData: APIEmoji; constructor(data: APIEmoji); _update(data: APIEmoji): this; createdAt(): number | "" | null; /** * Emoji url */ get url(): string | null; get uriComponent(): string; /** * Update information of this emoji * * Util if this is forged * @returns */ fetchInformation(client: AnyClient, guildId: string): Promise<this>; toString(): string | null; static from(emoji: string): Emoji | null; static parse(emoji: string): APIEmoji | null; static getEncodedURI(emoji: string | APIEmoji): string; } export interface ReactionCountDetails { /** * Count of super reactions */ burst: number; /** * Count of normal reactions */ normal: number; } export interface APIReaction extends RawAPIReaction { /** * Reaction count details object */ count_details: ReactionCountDetails; /** * The message id of this reaction */ message_id?: string; /** * The channel id of the message of this reaction */ channel_id?: string; } export interface APISuperReaction extends APIReaction { /** * HEX colors used for super reaction */ burst_colors: string[]; } export declare class Reaction { /** * Whether the current user reacted using this emoji */ me: boolean; /** * Emoji information */ emoji: Emoji; /** * Times this emoji has been used to react */ count: number; /** * Users reacted */ users: UserDataManager; /** * HEX colors used for super reaction */ burstColors: string[]; /** * Reaction count details object */ countDetails: ReactionCountDetails; _client: AnyClient; /** * The message of this reaction */ message: Message | null; /** * The message id of this reaction */ messageId?: string; /** * The channel id of the message of this reaction */ channelId?: string; constructor(data: DataWithClient<APIReaction | APISuperReaction>); _update(data: APIReaction | APISuperReaction): this; /** * Update information of this reaction * * Util if this is forged * @returns */ fetchInformation(channelId?: string | undefined, messageId?: string | undefined): Promise<this>; } //# sourceMappingURL=Emoji.d.ts.map