UNPKG

@seaavey/bot

Version:

The Library for Seaavey Bot

92 lines (91 loc) 2.4 kB
import { AnyMessageContent, GroupMetadata, MiscMessageGenerationOptions, WAMessage, WAMessageContent, WAMessageKey, proto } from '@seaavey/baileys'; type DeviceType = 'ios' | 'web' | 'android' | 'desktop' | 'unknown'; export interface IGroupAdmins { id: string; admin: string; } export interface MessageInfo { url?: string; mimetype?: string; caption?: string; fileSha256?: string; fileLength?: string; height?: number; width?: number; mediaKey?: string; fileEncSha256?: string; directPath?: string; mediaKeyTimestamp?: string; jpegThumbnail?: string; scansSidecar?: string; scanLengths?: number[]; midQualityFileSha256?: string; seconds?: number; contextInfo?: proto.IContextInfo; streamingSidecar?: string; externalShareFullVideoDurationInSeconds?: number; isAnimated?: boolean; stickerSentTs?: string; isAvatar?: boolean; isAiSticker?: boolean; isLottie?: boolean; ptt?: boolean; fileName?: string; pageCount?: number; } export interface Messages { message: WAMessageContent; key: WAMessageKey; from: string; fromMe: boolean; id: string; device: DeviceType; isGroup: boolean; participant?: string; sender?: string; metadata?: GroupMetadata; groupAdmins?: IGroupAdmins[]; isAdmin?: boolean; isBotAdmin?: boolean; pushName?: string; isOwner: boolean; type: string; msg: MessageInfo; mentions: string[]; body: string; prefix: string; command: string; args: string[]; text: string; expiration?: number; isQuoted: boolean; quoted?: { message: WAMessageContent; type: string; msg: MessageInfo; key: WAMessageKey; from?: string; fromMe: boolean; id: string; device: DeviceType; participant?: string; sender?: string; mentions: string[]; body: string; prefix: string; command: string; args: string[]; text: string; }; reply: (text: string | AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<WAMessage>; react: (text: string) => Promise<WAMessage>; } export interface IGroupMention { groupJid?: string | null; groupSubject?: string | null; } export interface IGroupAdmins { id: string; admin: string; } export {};