guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
56 lines • 2.23 kB
TypeScript
import { APIEmote, APIMessageReaction } from 'guilded-api-typings';
import { FetchOptions } from '../../managers/BaseManager';
import { Base } from '../Base';
import { Message } from './Message';
/**
* Represents a message reaction on Guilded.
* @example new MessageReaction(message, rawReaction);
*/
export declare class MessageReaction extends Base<number> {
readonly message: Message;
readonly raw: APIMessageReaction;
/** The ID of the channel the message belongs to. */
readonly channelId: string;
/** The ID of the message. */
readonly messageId: string;
/** The ID of the user that created the reaction. */
readonly createdBy: string;
/** The emote of the reaction. */
readonly emote: APIEmote;
/**
* @param message The message the reaction belongs to.
* @param raw The raw data of the reaction.
* @param cache Whether to cache the reaction.
*/
constructor(message: Message, raw: APIMessageReaction, cache?: boolean);
/** Whether the reaction is cached. */
get isCached(): boolean;
/** The channel the message belongs to. */
get channel(): import("../..").ChatChannel;
/** The ID of the server the message belongs to. */
get serverId(): string | undefined;
/** The server the message belongs to. */
get server(): import("../..").Server | undefined;
/** The server member that created the reaction. */
get author(): import("../..").ServerMember | undefined;
/**
* Fetch the server the message belongs to.
* @param options The options to fetch the server with.
* @returns The fetched server.
* @example reaction.fetchServer();
*/
fetchServer(options?: FetchOptions): Promise<import("../..").Server>;
/**
* Fetch the server member that created the reaction.
* @param options The options to fetch the server member with.
* @returns The fetched server member.
* @example reaction.fetchAuthor();
*/
fetchAuthor(options?: FetchOptions): Promise<import("../..").ServerMember>;
/**
* Remove the reaction from the message.
* @example reaction.remove();
*/
remove(): Promise<void>;
}
//# sourceMappingURL=MessageReaction.d.ts.map