2022-06-19 00:25:21 +00:00
|
|
|
import Msg, {MessageType} from "../../models/msg";
|
|
|
|
import {IrcEventHandler} from "../../client";
|
2020-06-29 07:51:17 +00:00
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
export default <IrcEventHandler>function (irc, network) {
|
2020-06-29 07:51:17 +00:00
|
|
|
const client = this;
|
|
|
|
|
|
|
|
irc.on("help", function (data) {
|
|
|
|
const lobby = network.channels[0];
|
|
|
|
|
|
|
|
if (data.help) {
|
|
|
|
const msg = new Msg({
|
2022-06-19 00:25:21 +00:00
|
|
|
type: MessageType.MONOSPACE_BLOCK,
|
2020-06-29 07:51:17 +00:00
|
|
|
command: "help",
|
|
|
|
text: data.help,
|
|
|
|
});
|
2020-08-14 11:26:03 +00:00
|
|
|
lobby.pushMessage(client, msg, true);
|
2020-06-29 07:51:17 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|