【文件属性】:
文件名称:微型漫游器:零配置电报漫游器
文件大小:7KB
文件格式:ZIP
更新时间:2021-01-30 18:43:17
bot telegram telegram-bot telegram-api BotJavaScript
微型机器人
:robot_face: 零配置电报漫游器
文献资料
micro-bot是建立在库之上的。
。
安装
从NPM安装:
$ npm install micro-bot
脚手架
如果您安装了最新的yarn或npm ,则可以使用脚手架工具:
$ npm init bot smart-bot
$ cd smart-bot
或使用yarn :
$ yarn create bot smart-bot
$ cd smart-bot
快速开始
以下示例将回答有关所有内容的重要信息。
$ mkdir smart-bot
$ cd smart-bot
$ npm init
$ npm install micro-bot --save
然后编写您的index.js 。
module . exports = ( { reply } ) => reply ( '42' )
然后在您的package.json :
"main" : "index.js" ,
"scripts" : {
"start" : "micro-bot"
}
要运行机器人,请使用micro-bot命令
【文件预览】:
micro-bot-master
----.gitignore(578B)
----.eslintrc(30B)
----package.json(982B)
----bin()
--------micro-bot(2KB)
----.travis.yml(39B)
----LICENSE(1KB)
----index.js(1KB)
----examples()
--------bot.js(321B)
----.eslintignore(14B)
----readme.md(5KB)
----.editorconfig(249B)