Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Couldn't run on Now. No error and No result #22

Open
mortezae opened this issue Apr 8, 2019 · 2 comments
Open

Couldn't run on Now. No error and No result #22

mortezae opened this issue Apr 8, 2019 · 2 comments

Comments

@mortezae
Copy link

mortezae commented Apr 8, 2019

Hello. I'm struggling with a micro-bot setup on Zeit Now and tried many different configs but get no result. I'm newbie on both Now and Telegraf, BTW I can run a simple echo web server on the same Now project but no success with bot code. It doesn't give any error when deploying and bot doesn't work at all. I don't know where I went wrong
This is all the code and files:

index.js: I used different codes such as this simple lines

const { mount, reply } = require('micro-bot')
module.exports = mount('sticker', reply('👍'))

packages.json

{
  "name": "mybot",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "micro-bot -t ${BOT_TOKEN} -d ${NOW_URL} index.js"
  },
  "dependencies": {
    "micro-bot": "^2.5.3"
  }
}

now.json

{
    "version": 2,
    "name": "mybot",
    "builds": [
        { "src": "*.js", "use": "@now/node" }
    ],
}

And my deploy command:

now -e BOT_TOKEN='828040278:AAG-NPbrdM5LkIUA1V5tbNxpA-yxemh5Cdc'

I don't know if the bot automatically sets Webhook, so I did it manually. https://api.telegram.org/botMYTOKEN/setWebhook?url=https://projecturl.me.now.sh

@mortezae mortezae changed the title Didn't managed to run on Now. No error and No result Couldn't run on Now. No error and No result Apr 8, 2019
@franspeter
Copy link

Any update here?

@weiran
Copy link

weiran commented May 26, 2019

micro-bot doesn't support now version 2, you have to use v1 until: #17 is resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants