UNPKG

@lilybird/transformers

Version:
89 lines 4.18 kB
import { MentionChannel } from "./channel.js"; import { GuildMember } from "./guild-member.js"; import { Channel } from "./channel.js"; import { User } from "./user.js"; import type { Channel as LilyChannel, Message as LilyMessage, ResolvedDataStructure, MessageType, Application, Sticker, Client, Embed, Role } from "lilybird"; import { Poll } from "./poll.js"; export type PartialMessage<T extends Message = Message> = Partial<T> & { [K in keyof Message as Message[K] extends (...args: Array<any>) => any ? K : K extends "id" | "channelId" | "client" ? K : never]: Message[K]; }; export interface MessageEditOptions extends LilyMessage.EditJSONParams { componentsV2?: boolean; suppressEmbeds?: boolean; } export interface MessageReplyOptions extends LilyMessage.CreateJSONParams { tts?: boolean; componentsV2?: boolean; suppressEmbeds?: boolean; suppressNotifications?: boolean; } export declare class Message { readonly id: string; readonly author: User; readonly channelId: string; readonly content: string | undefined; readonly timestamp: Date; readonly editedTimestamp: Date | undefined; readonly tts: boolean; readonly mentionsEveryone: boolean; readonly mentions: Array<User>; readonly mentionedRoles: Array<Role.Structure>; readonly mentionedChannels: Array<MentionChannel>; readonly attachments: Array<LilyChannel.AttachmentStructure> | undefined; readonly embeds: Array<Embed.Structure> | undefined; readonly reactions: Array<LilyMessage.ReactionStructure>; readonly nonce: string | number | undefined; readonly pinned: boolean; readonly webhookId: string | undefined; readonly type: MessageType; readonly activity: LilyMessage.ActivityStructure | undefined; readonly application: Partial<Application.Structure> | undefined; readonly applicationId: string | undefined; readonly messageReference: LilyMessage.ReferenceStructure | undefined; readonly flags: number; readonly referencedMessage: Message | undefined; readonly interactionMetadata: LilyMessage.InteractionMetadataStructure | undefined; readonly interaction: LilyMessage.InteractionStructure | undefined; readonly thread: Channel | undefined; readonly components: Array<LilyMessage.Component.Structure> | undefined; readonly stickerItems: Array<Sticker.ItemStructure> | undefined; readonly stickers: Array<Sticker.Structure> | undefined; readonly position: number | undefined; readonly roleSubscriptionData: Role.SubscriptionDataStructure | undefined; readonly resolved: ResolvedDataStructure | undefined; readonly poll: Poll | undefined; readonly guildId: string | undefined; readonly member: GuildMember | undefined; readonly client: Client; constructor(client: Client, message: LilyMessage.GuildStructure | LilyMessage.Structure); reply(content: string, options?: MessageReplyOptions): Promise<Message>; reply(options: MessageReplyOptions): Promise<Message>; sendInChannel(content: string, options?: MessageReplyOptions): Promise<Message>; sendInChannel(options: MessageReplyOptions): Promise<Message>; forwardTo(channelId: string, options: MessageReplyOptions): Promise<Message>; edit(content: string, options?: MessageEditOptions): Promise<Message>; edit(options: MessageEditOptions): Promise<Message>; react(emoji: string, isCustomEmoji?: boolean): Promise<void>; delete(reason?: string): Promise<void>; crosspost(): Promise<void>; pin(): Promise<void>; unpin(): Promise<void>; startThread(name: string): Promise<Channel>; fetchChannel(force?: boolean): Promise<Channel>; hasContent(): this is this & { content: string; }; hasAttachments(): this is this & { attachments: Array<LilyChannel.AttachmentStructure>; }; hasEmbeds(): this is this & { embeds: Array<Embed.Structure>; }; hasComponents(): this is this & { components: Array<LilyMessage.Component.Structure>; }; hasStickers(): this is this & { stickerItems: Array<Sticker.ItemStructure>; }; } //# sourceMappingURL=message.d.ts.map