mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
add some including
This commit is contained in:
parent
f908db7b3b
commit
05e6d084b5
@ -7,11 +7,20 @@ var commands = function(dbot) {
|
||||
alias = event.params[1].trim();
|
||||
|
||||
if(_.include(knownUsers.users, alias)) {
|
||||
var aliasCount = this.api.getAliases(event.server, alias).length;
|
||||
var aliases = this.api.getAliases(event.server, alias);
|
||||
var aliasCount = aliases.length;
|
||||
|
||||
var aliases = _.first(aliases, 10);
|
||||
var including = 'including: ';
|
||||
for(var i=0;i<aliases.length;i++) {
|
||||
including += alises[i] + ', ';
|
||||
}
|
||||
including = including.slice(0, -2) + '.';
|
||||
|
||||
event.reply(dbot.t('primary', {
|
||||
'user': alias,
|
||||
'count': aliasCount
|
||||
}));
|
||||
}) + including);
|
||||
} else if(_.has(knownUsers.aliases, alias)) {
|
||||
event.reply(dbot.t('alias', {
|
||||
'alias': alias,
|
||||
|
@ -3,7 +3,7 @@
|
||||
"english": "{alias} is an alias of {user}"
|
||||
},
|
||||
"primary": {
|
||||
"english": "{user} is a primary user with {count} aliases."
|
||||
"english": "{user} is a primary user with {count} aliases, "
|
||||
},
|
||||
"unknown_alias": {
|
||||
"english": "{alias} does not currently exist as an alias or known user."
|
||||
|
Loading…
Reference in New Issue
Block a user