koishi-plugin-memes-api
Version:
表情包制作插件调用 API 版
23 lines (22 loc) • 717 B
TypeScript
import { Context, Session } from 'koishi';
import { Config } from '../config';
declare module '../index' {
interface MemeInternal {
getInfoFromID(session: Session, userId: string, forceFallback?: boolean): Promise<ImageAndUserInfo>;
}
}
export type UserInfoGender = 'male' | 'female' | 'unknown';
export interface UserInfo {
name?: string;
gender?: UserInfoGender;
}
export interface ImageAndUserInfo {
url: string;
userInfo: UserInfo;
}
export declare class GetAvatarFailedError extends Error {
readonly platform: string;
readonly userId: string;
constructor(platform: string, userId: string);
}
export declare function apply(ctx: Context, config: Config): Promise<void>;