mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
Merge branch 'reality:master' into master
This commit is contained in:
commit
1eb2230032
13
modules/tell/README.md
Normal file
13
modules/tell/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
## Tell
|
||||||
|
|
||||||
|
### Description
|
||||||
|
This module leaves a message for somebody in a channel.
|
||||||
|
If you PM the bot it won't be able to relay your message since it will look for a channel.
|
||||||
|
|
||||||
|
### Commands
|
||||||
|
|
||||||
|
#### ~tell [username] [text]
|
||||||
|
Tell a user something as soon as they come online.
|
||||||
|
|
||||||
|
#### ~ctells
|
||||||
|
Clear all tells from your username.
|
@ -39,6 +39,24 @@ var tell = function(dbot) {
|
|||||||
event.reply('no idea who that is mate');
|
event.reply('no idea who that is mate');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
'ctells': function(event) { // from mokay: i disgust me too
|
||||||
|
//console.log(tells);
|
||||||
|
var found_tells = false;
|
||||||
|
for(var attr in tells){
|
||||||
|
for (var attr2 in tells[attr]){
|
||||||
|
if (tells[attr][attr2]["from"] == event.user){
|
||||||
|
found_tells = true;
|
||||||
|
tells[attr].splice(attr2, 1);
|
||||||
|
//console.log(tells);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found_tells == false){
|
||||||
|
event.reply(event.user + ": no tells found for your username");
|
||||||
|
} else if (found_tells == true){
|
||||||
|
event.reply(event.user + ": all tells removed from your username");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.commands.tell.regex = [/tell ([^ ]+) (.+)/, 3];
|
this.commands.tell.regex = [/tell ([^ ]+) (.+)/, 3];
|
||||||
|
Loading…
Reference in New Issue
Block a user