Created
September 24, 2018 15:48
-
-
Save ejnshtein/8f25ee0b8764f8a3e3f9f5ada65fc049 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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