mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-29 15:44:31 +00:00
fix tests for node-irc
This commit is contained in:
@@ -8,15 +8,15 @@ var bot = new irc.Client('irc.dollyfish.net.nz', 'nodebot', {
|
||||
channels: ['#blah', '#test']
|
||||
});
|
||||
|
||||
bot.addListener('error', <irc.handlers.IError> ((message) => {
|
||||
bot.addListener('error', <irc.handlers.IError> ((message: irc.IMessage) => {
|
||||
console.error('ERROR: %s: %s', message.command, message.args.join(' '));
|
||||
}));
|
||||
|
||||
bot.addListener('message#blah', <irc.handlers.IMessageChannel> ((from, message) => {
|
||||
bot.addListener('message#blah', <irc.handlers.IMessageChannel> ((from: string, message: string) => {
|
||||
console.log('<%s> %s', from, message);
|
||||
}));
|
||||
|
||||
bot.addListener('message', <irc.handlers.IRecievedMessage> ((from, to, message) => {
|
||||
bot.addListener('message', <irc.handlers.IRecievedMessage> ((from: string, to: string, message: string) => {
|
||||
console.log('%s => %s: %s', from, to, message);
|
||||
|
||||
if (to.match(/^[#&]/)) {
|
||||
@@ -37,18 +37,18 @@ bot.addListener('message', <irc.handlers.IRecievedMessage> ((from, to, message)
|
||||
}
|
||||
}));
|
||||
|
||||
bot.addListener('pm', <irc.handlers.IPm> ((nick, message) => {
|
||||
bot.addListener('pm', <irc.handlers.IPm> ((nick: string, message: string) => {
|
||||
console.log('Got private message from %s: %s', nick, message);
|
||||
}));
|
||||
|
||||
bot.addListener('join', <irc.handlers.IJoin> ((channel, who) => {
|
||||
bot.addListener('join', <irc.handlers.IJoin> ((channel: string, who: string) => {
|
||||
console.log('%s has joined %s', who, channel);
|
||||
}));
|
||||
|
||||
bot.addListener('part', <irc.handlers.IPart> ((channel, who, reason) => {
|
||||
bot.addListener('part', <irc.handlers.IPart> ((channel: string, who: string, reason: string) => {
|
||||
console.log('%s has left %s: %s', who, channel, reason);
|
||||
}));
|
||||
|
||||
bot.addListener('kick', <irc.handlers.IKick> ((channel, who, by, reason) => {
|
||||
bot.addListener('kick', <irc.handlers.IKick> ((channel: string, who: string, by: string, reason: string) => {
|
||||
console.log('%s was kicked from %s by %s: %s', who, channel, by, reason);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user