3
0
mirror of https://github.com/reality/dbot.git synced 2025-01-12 04:52:36 +01:00

qsearch random quote

This commit is contained in:
reality 2017-03-25 00:40:52 +00:00
parent 92598b13c2
commit 9a44c41fbd

View File

@ -241,7 +241,7 @@ var commands = function(dbot) {
event.reply(dbot.t('search_results', { event.reply(dbot.t('search_results', {
'category': matches[0].category, 'category': matches[0].category,
'needle': needle, 'needle': needle,
'quote': matches[0].quote, 'quote': matches[_.random(0, _.size(matches) -1)].quote,
'matches': matches.length 'matches': matches.length
})); }));
} else { } else {
@ -263,7 +263,7 @@ var commands = function(dbot) {
event.reply(dbot.t('search_results', { event.reply(dbot.t('search_results', {
'category': haystack, 'category': haystack,
'needle': needle, 'needle': needle,
'quote': matches[0], 'quote': matches[_.random(0, _.size(matches) -1)].quote,
'matches': matches.length 'matches': matches.length
})); }));
} }