Open lgg opened 5 years ago
index.js
const {Composer, log, session} = require('micro-bot')
const bot = new Composer()
bot.use(log())
bot.use(session())
bot.start(({reply}) => reply('Welcome message'))
bot.help(({reply}) => reply('Help message'))
bot.settings(({reply}) => reply('Bot settings'))
bot.command('date', ({reply}) => reply(`Server time: ${Date()}`))
module.exports = bot
package.json
{
"name": "rtumireaprofkombot",
"version": "0.0.0",
"description": "RTU MIREA Profkom bot",
"repository": {
"url": "lgg/rtumireaprofkombot",
"type": "git"
},
"main": "index.js",
"scripts": {
"dev": "supervisor -x micro-bot index.js",
"start": "micro-bot",
"now-start": "micro-bot -d ${NOW_URL}",
"lint": "eslint .",
"test": "npm run lint"
},
"engines": {
"node": ">=8.5.0"
},
"author": "lgg",
"license": "MIT",
"dependencies": {
"micro-bot": "^2.5.1"
},
"devDependencies": {
"eslint": "^5.9.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"supervisor": "^0.12.0"
}
}
How did you solve this error? I'm also facing the same issue!
@darshantejani007 I didn't solve this issue. I used pure telegraf in new projects (empty repo) and for some reason it worked...
I used telegraf to access telegram bot api and express for server creation :)
Tried:
Bot started but got error:
Output: