@grammyjs/hydrate
Version:
Hydration plugin for grammY
17 lines (16 loc) • 1.09 kB
TypeScript
import type { ChatMember, ChatPermissions, RawApi, User } from "../deps.node.js";
import type { Other, Ret } from "../plugin.js";
export interface UserXFragment {
getProfilePhotos(other?: Other<"getUserProfilePhotos">, signal?: AbortSignal): Ret<"getUserProfilePhotos">;
ban(other?: Other<"banChatMember">, signal?: AbortSignal): Ret<"banChatMember">;
unban(other?: Other<"unbanChatMember">, signal?: AbortSignal): Ret<"unbanChatMember">;
restrict(permissions: ChatPermissions, other?: Other<"restrictChatMember">, signal?: AbortSignal): Ret<"restrictChatMember">;
promote(other?: Other<"promoteChatMember">, signal?: AbortSignal): Ret<"promoteChatMember">;
setCustomTitle(title: string, other?: Other<"setChatAdministratorCustomTitle">, signal?: AbortSignal): Ret<"setChatAdministratorCustomTitle">;
}
export type UserX = UserXFragment & User;
export type ChatMemberX = ChatMember & {
user: UserX;
};
export declare function installUserMethods(api: RawApi, user: User, chatId: number): User & UserXFragment;
import { AbortSignal } from "./../shim.node.js";