slack-webhook-alias
Version:
Slack Webhook Library with alias for sending Slack notifications to multiple channels
16 lines (15 loc) • 639 B
TypeScript
export default class SlackBot<T extends {
[key: string]: string;
}> {
private _aliases;
private disabled;
constructor(aliases: T, disabled?: boolean);
send<M>(alias: keyof T, object: M): Promise<import("axios").AxiosResponse<any, any>>;
sendText(alias: keyof T, text: string): Promise<import("axios").AxiosResponse<any, any>>;
createBot: (alias: keyof T) => {
send: <M extends unknown>(object: M) => Promise<void>;
sendText: (text: string) => Promise<void>;
sendForce: <M_1 extends unknown>(object: M_1) => Promise<void>;
sendTextForce: (text: string) => Promise<void>;
};
}