telegraf / micro-bot

:robot: Zero-configuration Telegram bot runner
MIT License
182 stars 29 forks source link

handler is not a function #14

Closed emersonlaurentino closed 6 years ago

emersonlaurentino commented 6 years ago

when I do deploy in now.sh and squeeze any command, it returns me an error: handler is not a function

https://github.com/telegraf/micro-bot#advanced-examples

amir-hossein-zarei commented 5 years ago

how do you solve your problem?

emersonlaurentino commented 5 years ago

I was implementing it wrong, so I used the micro-bot.

amir-hossein-zarei commented 5 years ago

can you help me? μ-bot: Unhandled error TypeError: handler is not a function this is my code: `const { readFileSync } = require('fs') const { Composer } = require('micro-bot') var HttpsProxyAgent = require('https-proxy-agent'); const app = new Composer()

app.start((ctx) => ctx.reply('Welcome ${ctx.message}')) app.help((ctx) => ctx.reply('Help message')) app.hears('hi', ({ reply }) => reply('Hello')) app.on('sticker', ({ reply }) => reply('👍'))

// Export bot handler module.exports = app module.exports = {options: {telegram: {agent: new HttpsProxyAgent('http://127.0.0.1:3503')}}}`

amir-hossein-zarei commented 5 years ago

what do you mean? please, help :(