ctcp wrapper function example

This commit is contained in:
Evert Prants 2022-09-24 12:21:31 +03:00
parent 02d221ff4c
commit e0b38cb708
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { IRCBot } from '../bot';
import {
applyCTCP,
applyTextColor,
wrapFormattedText,
} from '../utility/message-formatting';
@ -65,6 +66,11 @@ bot.on('message', ({ message, to, nickname }) => {
return;
}
if (message.startsWith('!hug')) {
bot.send(to, applyCTCP(`hugs ${nickname}`));
return;
}
if (message.startsWith('!names')) {
bot.names(to).then(console.log);
return;