find intro by index
This commit is contained in:
parent
94a475ab21
commit
d1d925052d
|
@ -34,19 +34,21 @@ const balabolaMessage = `Выбери стилизацию ответа:
|
|||
7: синопсис
|
||||
более подробно команда help`;
|
||||
|
||||
const BALABOLA_INTROS = [0, 24, 25, 11, 6, 8, 9];
|
||||
|
||||
filter.hear(/^(?:продолжи)\s(.*)?$/i, async ctx => {
|
||||
await ctx.send(balabolaMessage, {
|
||||
keyboard: selectStyleKeyboard(ctx)
|
||||
});
|
||||
});
|
||||
|
||||
filter.hear(/^(?:пр)\s(0|24|25|11|6|8|9)\s(.*)?$/i, async ctx => {
|
||||
filter.hear(/^(?:пр)\s(1|2|3|4|5|6|7)\s(.*)?$/i, async ctx => {
|
||||
const intro = ctx.$match[1];
|
||||
const query = ctx.$match[2];
|
||||
|
||||
await ctx.send('генерирую!!');
|
||||
|
||||
const result = await balabolaQueue.add(() => balabola(query, +intro));
|
||||
const result = await balabolaQueue.add(() => balabola(query, BALABOLA_INTROS[+intro - 1]));
|
||||
await ctx.send(result);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue