import type { Api } from "@yaebal/core"; import type * as t from "@yaebal/types"; /** A friendly reaction: an emoji string, a `{ emoji }` / `{ custom_emoji_id }` shorthand, or a raw `ReactionType`. */ export type ReactionInput = string | { emoji: string; } | { custom_emoji_id: string; } | t.ReactionType; type SendExtra = Omit; type EditExtra = Omit; type CaptionExtra = Omit; type ReactExtra = Omit; type QuoteExtra = Omit; type BanExtra = Omit; type UnbanExtra = Omit; type RestrictExtra = Omit & { /** target user — defaults to the sender of this message. */ user_id?: number; }; /** Fields every Message-based context carries (merged from the payload). */ interface MessageFields { readonly api: Api; chat: t.Chat; message_id: number; from?: t.User; business_connection_id?: string; message_thread_id?: number; direct_messages_topic?: t.DirectMessagesTopic; } type Ctor = abstract new (...args: any[]) => T; /** * Adds the ergonomic positional overloads + convenience getters shared by every * Message-based context (message, channel_post, edited_*, business_*). Methods * call `this.api.call` directly (so the mixin needs no `super`). */ export declare function MessageSugar>(Base: TBase): (abstract new (...args: any[]) => { /** Send a new message to this chat. Pass a string for the common case. */ send(text: string, params?: SendExtra): Promise; send(params: Omit): Promise; /** Reply to this message. Pass a string for the common case. */ reply(text: string, params?: SendExtra): Promise; reply(params: Omit): Promise; /** Edit this message's text. Pass a string for the common case. */ editText(text: string, params?: EditExtra): Promise; editText(params: Omit): Promise; /** Edit this message's caption. Pass a string for the common case. */ editCaption(caption: string, params?: CaptionExtra): Promise; editCaption(params: Omit): Promise; /** Clear all reactions on this message. */ react(): Promise; /** React with a single emoji. */ react(emoji: string, params?: ReactExtra): Promise; /** React with a custom emoji (the emoji string is a readable fallback). */ react(emoji: string, customEmojiId: string, params?: ReactExtra): Promise; /** React with one or many reactions (emoji / `{ emoji }` / `{ custom_emoji_id }` / raw). */ react(reactions: ReactionInput | ReactionInput[], params?: ReactExtra): Promise; /** React with raw `setMessageReaction` params. */ react(params: Omit): Promise; /** Send a chat action — the "bot is typing…" indicator. Defaults to `"typing"`. */ typing(action?: t.SendChatActionParams["action"]): Promise; /** Reply quoting a piece of this message's text (`reply_parameters.quote`). */ quote(quoteText: string, text: string, params?: QuoteExtra): Promise; /** Ban a user from this chat. Defaults to the sender of this message. */ ban(userId?: number, params?: BanExtra): Promise; /** Unban a user from this chat. Defaults to the sender of this message. */ unban(userId?: number, params?: UnbanExtra): Promise; /** Restrict a user in this chat. The target defaults to the sender of this message. */ restrict(permissions: t.ChatPermissions, params?: RestrictExtra): Promise; /** * Mute a user (all send permissions off), optionally for `seconds` from now. * The target defaults to the sender of this message. */ mute(seconds?: number, params?: RestrictExtra): Promise; readonly api: Api; chat: t.Chat; message_id: number; from?: t.User; business_connection_id?: string; message_thread_id?: number; direct_messages_topic?: t.DirectMessagesTopic; }) & TBase; export {}; //# sourceMappingURL=message-mixin.d.ts.map