ctcp wrapper function example
This commit is contained in:
parent
02d221ff4c
commit
e0b38cb708
@ -1,5 +1,6 @@
|
|||||||
import { IRCBot } from '../bot';
|
import { IRCBot } from '../bot';
|
||||||
import {
|
import {
|
||||||
|
applyCTCP,
|
||||||
applyTextColor,
|
applyTextColor,
|
||||||
wrapFormattedText,
|
wrapFormattedText,
|
||||||
} from '../utility/message-formatting';
|
} from '../utility/message-formatting';
|
||||||
@ -65,6 +66,11 @@ bot.on('message', ({ message, to, nickname }) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message.startsWith('!hug')) {
|
||||||
|
bot.send(to, applyCTCP(`hugs ${nickname}`));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (message.startsWith('!names')) {
|
if (message.startsWith('!names')) {
|
||||||
bot.names(to).then(console.log);
|
bot.names(to).then(console.log);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user