Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "coffea-telegram",
- "version": "1.0.0-beta9-1",
- "main": "lib/index.js",
- "devDependencies": {
- "babel-cli": "^6.9.0",
- "babel-core": "^6.5.1",
- "babel-plugin-transform-object-rest-spread": "^6.5.0",
- "babel-preset-es2015": "^6.5.0",
- "eslint": "^2.0.0-rc.1",
- "eslint-config-standard": "^5.1.0",
- "eslint-plugin-promise": "^1.0.8",
- "eslint-plugin-standard": "^1.3.2",
- "rimraf": "^2.5.2"
- },
- "dependencies": {
- "coffea": "1.0.0-beta18",
- "debug-dude": "^1.0.3",
- "node-telegram-bot-api": "^0.21.1"
- },
- "scripts": {
- "lint": "./node_modules/.bin/eslint src test",
- "clean": "./node_modules/.bin/rimraf lib",
- "compile": "./node_modules/.bin/babel --presets es2015 -d lib/ src/",
- "prepublish": "npm run lint && npm run clean && npm run compile"
- },
- "readme": "# coffea-telegram\n\n_telegram plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_\n\n\n## Setup\n\n * Make sure to use the latest *beta* version of coffea by running: `npm install --save coffea@beta`\n * Install `coffea-telegram`: `npm install coffea-telegram`\n\n\n## Usage\n\nSpecify the telegram protocol in your network config:\n\n```js\n{\n \"protocol\": \"telegram\",\n \"token\": \"TOKEN\"\n}\n```\n\ncoffea will automatically load `coffea-telegram` when it's needed! Thus, using telegram (or other protocols) this way should work on **any** coffea project, **without any tweaks** (other than installing `coffea-telegram` and specifying the config).\n\n`coffea-telegram` aims to be compatible with coffea. Of course, features that telegram doesn't have (like joining channels) aren't available for telegram protocols, they will just\nbe ignored.\n\n\n## Special Events\n\nTelegram has some special events that IRC doesn't have, you can listen to them just like listening to messages and other events:\n\n```\nnetworks.on('EVENTNAME', (event, reply) => {\n console.log(event)\n})\n```\n\nThe following events are available: `text`, `audio`, `document`, `photo`, `sticker`, `video`, `voice`, `contact`, `location`, `new_chat_participant`, `left_chat_participant`, `new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`\n\nFor some example bots, check out the [coffea-bots organisation](https://github.com/coffea-bots)\nfor existing bots, or the [coffea-starter repo](https://github.com/coffea-bots/coffea-starter),\nif you want to create your own bot.\n\n\n## Telegram API\n\nYou can use:\n\n```js\nnetworks.send({\n type: 'FUNCTION_NAME',\n arguments\n})\n```\n\nto access the [telegram api](https://github.com/yagop/node-telegram-bot-api#api-reference).\nAll arguments have the same names, except the ids have all been simplified to `id` instead of `chatId`, `inlineQueryId`, etc.\n\nHere is an example:\n\n```js\nnetworks.send({\n type: 'getMe'\n}).then(\n me => console.log(me)\n)\n```\n",
- "readmeFilename": "README.md",
- "description": "_telegram plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_",
- "_id": "coffea-telegram@1.0.0-beta9-1",
- "dist": {
- "shasum": "f1ecdfb9d9572cb8ed15e8f0e7780b061894a80f"
- },
- "_from": "coffea-telegram@^1.0.0-beta8",
- "_resolved": "https://registry.npmjs.org/coffea-telegram/-/coffea-telegram-1.0.0-beta9-1.tgz"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement