thelounge/src/plugins/irc-events/help.ts
2022-05-21 11:50:55 -07:00

22 lines
451 B
TypeScript

"use strict";
import Msg, {MessageType} from "../../models/msg";
import {IrcEventHandler} from "../../client";
export default <IrcEventHandler>function (irc, network) {
const client = this;
irc.on("help", function (data) {
const lobby = network.channels[0];
if (data.help) {
const msg = new Msg({
type: MessageType.MONOSPACE_BLOCK,
command: "help",
text: data.help,
});
lobby.pushMessage(client, msg, true);
}
});
};