Skip to content

Instantly share code, notes, and snippets.

@ejnshtein
Created September 24, 2018 15:48
Show Gist options
  • Save ejnshtein/8f25ee0b8764f8a3e3f9f5ada65fc049 to your computer and use it in GitHub Desktop.
Save ejnshtein/8f25ee0b8764f8a3e3f9f5ada65fc049 to your computer and use it in GitHub Desktop.
const Telegraf = require('telegraf')
const bot = new Telegraf(config.bot.token)
function sleep(timeout) {
return new Promise(resolve => setTimeout(resolve, timeout))
}
bot.command('debil', async ctx => {
await sleep(5000)
await ctx.reply('ok')
})
bot.command('hm', ctx => {
ctx.reply('nook')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment