mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
dont show including if no aliases
This commit is contained in:
parent
bf40369352
commit
eb104f157b
@ -10,6 +10,7 @@ var commands = function(dbot) {
|
||||
var aliases = this.api.getAliases(event.server, alias);
|
||||
var aliasCount = aliases.length;
|
||||
|
||||
if(aliasCount != 0) {
|
||||
var aliases = _.first(aliases, 10);
|
||||
var including = 'including: ';
|
||||
for(var i=0;i<aliases.length;i++) {
|
||||
@ -21,6 +22,12 @@ var commands = function(dbot) {
|
||||
'user': alias,
|
||||
'count': aliasCount
|
||||
}) + including);
|
||||
} else {
|
||||
event.reply(dbot.t('primary', {
|
||||
'user': alias,
|
||||
'count': aliasCount
|
||||
}));
|
||||
}
|
||||
} else if(_.has(knownUsers.aliases, alias)) {
|
||||
event.reply(dbot.t('alias', {
|
||||
'alias': alias,
|
||||
|
Loading…
Reference in New Issue
Block a user