osu-api-extended
Version:
Advanced osu! api wrapper for v1 and v2, with extra stuff
21 lines (20 loc) • 903 B
TypeScript
import { IDefaultParams, IError } from "../../types";
import { chatChannelsActionsSendResponse } from "../../types/v2/chat_channels_actions_send";
import { chatChannelsActionsJoinResponse } from "../../types/v2/chat_channels_actions_join";
type params = ({
type: 'send';
is_action: boolean;
channel_id: number;
message: string;
} | {
type: 'join' | 'leave';
channel_id: number;
user_id: number;
} | {
type: 'read';
channel_id: number;
message_id: number;
});
type Response<T extends params['type']> = T extends 'send' ? chatChannelsActionsSendResponse & IError : T extends 'join' ? chatChannelsActionsJoinResponse & IError : T extends 'leave' ? "" & IError : T extends 'read' ? "" & IError : IError;
export declare const chat_channels_actions: <T extends params>(params: T, addons?: IDefaultParams) => Promise<Response<T["type"]>>;
export {};