Skip to content
Gago edited this page Apr 19, 2021 · 9 revisions

API definitions for various objects used in the module.

DiscordMessage

{
 id: string;
 content: string;
 author: DiscordUser;
 channel: DiscordBaseChannel;
 url: string;
 type?: MessageType;
 pinned: boolean;
 attachments: DiscordAttachment[];
 raw?: string;
}

DiscordUser
DiscordBaseChannel
MessageType (External link)
DiscordAttachment

DiscordReaction

{
 user: DiscordUser;
 emoji: DiscordEmoji;
 message: DiscordMessage;
 count: number | null;
 event: 'add' | 'remove';
}

DiscordUser
DiscordEmoji
DiscordMessage

DiscordEmoji

{
 id: string | null;
 name: string;
 identifier: string;
 stringRepresentation: string;
}

DiscordUser

{
 id: string;
 username: string | null;
 tag: string | null;
 avatar: string | null;
 defaultAvatarURL: string | null;
 type: 'bot' | 'user';
 createdAt: string;
 locale: string | null;
}

RichEmbedArgs

{
  title?: string;
  description?: string;
  url?: string;
  type:  'rich' | 'image' | 'video' | 'gifv' | 'article' | 'link';
  color?: ColorResolvable;
  timestamp?: number;
  footer?: {
    icon?: string;
    text: string;
  };
  provider?: {
    name: string;
    url: string;
  };
  thumbnail?: string;
  author?: {
    name: string;
    url?: string;
    iconUrl?: string;
  };
 attachments?: {
    name: string;
    attachment: string | Buffer | Stream;
  }[];
 field?: {
    name: string;
    value: string;
    inline?: boolean;
  };
 fields?: {
    name: string;
    value: string;
    inline?: boolean;
  }[];
}

ColorResolvable (External link)

DiscordBaseChannel

{
 id: string;
 type: string;
 name: string | null; // null for DM
 createdAt: string;
}

DiscordAttachment

{
 id: string;
 name: string | null;
 size: number;
 url: string;
 proxyUrl: string;
}

Clone this wiki locally