KL
bot.start((ctx) => ctx.reply(ctx.startPayload))
в бота приходит команда "/start abc"
, в общем достаешь эту abc и смотришь дальшеSize: a a a
KL
bot.start((ctx) => ctx.reply(ctx.startPayload))
в бота приходит команда "/start abc"
, в общем достаешь эту abc и смотришь дальшеАТ
bot.start((ctx) => ctx.reply(ctx.startPayload))
в бота приходит команда "/start abc"
, в общем достаешь эту abc и смотришь дальшеOS
import util from 'util';
import { Markup as m} from 'telegraf';
import bot from '../app';
const delay = util.promisify(setTimeout);
async function task() {
const { telegram: tg } = bot;
const { api } = bot.context;
const query = { status: 1 };
const clients = api.service('clients').find({query});
for await (const client of clients) {
const keyboard = m.inlineKeyboard([]).extra();
await tg.sendMessage(client.chatId, '...', keyboard);
await delay(250);
}
}
task();
r
I
import util from 'util';
import { Markup as m} from 'telegraf';
import bot from '../app';
const delay = util.promisify(setTimeout);
async function task() {
const { telegram: tg } = bot;
const { api } = bot.context;
const query = { status: 1 };
const clients = api.service('clients').find({query});
for await (const client of clients) {
const keyboard = m.inlineKeyboard([]).extra();
await tg.sendMessage(client.chatId, '...', keyboard);
await delay(250);
}
}
task();
OS
OS
OS
I
r
I
АТ
i
i
Cron.schedule(cronPattern, async () => {
for (const user of await User.find(filter)) {
...
await sendHoroscope(...)
...
}
})
I
OS
Д
OS
OS
I