UNPKG

osu-api-extended

Version:

Advanced osu! api wrapper for v1 and v2, with extra stuff

18 lines (17 loc) 733 B
import { IDefaultParams, IError } from "../../types"; import { ChatActionsNewResponse } from "../../types/v2/chat_actions_new"; import { ChatActionsKeepaliveResponse } from "../../types/v2/chat_actions_keepalive"; type params = ({ type: 'new'; is_action: boolean; user_id: number; message: string; uuid?: string; } | { type: 'keepalive'; history_since?: number; since?: number; }); type Response<T extends params['type']> = T extends 'new' ? ChatActionsNewResponse & IError : T extends 'keepalive' ? ChatActionsKeepaliveResponse[] & IError : IError; export declare const chat_actions: <T extends params>(params: T, addons?: IDefaultParams) => Promise<Response<T["type"]>>; export {};