{"_id":"30-lines-telegram-bot","_rev":"1-e1dc85c108d3236feeb0af44ac9184fa","name":"30-lines-telegram-bot","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"30-lines-telegram-bot","version":"1.0.0","description":"Telegram bot in 30 lines of code","main":"index.js","scripts":{"test":"node index.js"},"dependencies":{"node-telegram-bot-api":"0.29.0","binancepricebot":"1.0.2","mexcpricebot":"1.0.0","request":"2.83.0"},"repository":{"type":"git","url":"git+https://github.com/20dec/30-lines-telegram-bot.git"},"keywords":["TELEGRAM","BOT"],"author":{"name":"20dec"},"license":"ISC","bugs":{"url":"https://github.com/20dec/30-lines-telegram-bot/issues"},"homepage":"https://github.com/20dec/30-lines-telegram-bot#readme","_id":"30-lines-telegram-bot@1.0.0","gitHead":"7a70548dda852392af5aed703d98f39d304600a0","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-IKGCOTLQiQUIgPngKZDXI7nTMsGgQfUjshmsppQMBzm6giSny5iz7EXZNxCMfw8inW/x8PC/VjpL4vq+xbz8ag==","shasum":"334847e22e5d3e76c6656cd3f1dfac7cf920397b","tarball":"https://registry.npmjs.org/30-lines-telegram-bot/-/30-lines-telegram-bot-1.0.0.tgz","fileCount":5,"unpackedSize":37145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq3PFAz8cVW7/VSwL4Q3utdpiIyvDyZR9JCWutPF02lQIgfSHxR46jQ/i3NTDdoLKmHDFHKoQ+u133Ebj8y/t+GWM="}]},"_npmUser":{"name":"20dec","email":"20dec.20dec@gmail.com"},"directories":{},"maintainers":[{"name":"20dec","email":"20dec.20dec@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/30-lines-telegram-bot_1.0.0_1710380749513_0.7187698301179026"},"_hasShrinkwrap":false},"1.0.1":{"name":"30-lines-telegram-bot","version":"1.0.1","description":"Telegram bot in 30 lines of code","main":"index.js","scripts":{"test":"node index.js"},"dependencies":{"node-telegram-bot-api":"0.29.0","binancepricebot":"1.0.2","mexcpricebot":"1.0.0","crypto-price-api":"1.0.0","request":"2.83.0"},"repository":{"type":"git","url":"git+https://github.com/20dec/30-lines-telegram-bot.git"},"keywords":["TELEGRAM","BOT"],"author":{"name":"20dec"},"license":"ISC","bugs":{"url":"https://github.com/20dec/30-lines-telegram-bot/issues"},"homepage":"https://github.com/20dec/30-lines-telegram-bot#readme","_id":"30-lines-telegram-bot@1.0.1","gitHead":"7a70548dda852392af5aed703d98f39d304600a0","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-MOuq3nBQcwhyJ7NHymbTEpWagO1v1wgkxHdw+UUDifoX3m9YKng3hJeJzS+y30WZ9EegWXGFREwwwHXjROF4bA==","shasum":"473e28f3a461c35941635956de0b097bf293fdc1","tarball":"https://registry.npmjs.org/30-lines-telegram-bot/-/30-lines-telegram-bot-1.0.1.tgz","fileCount":5,"unpackedSize":37176,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwRyJidgobTcgktZ6ioMADWqQqsCMpehJbCArOFO6J0gIgMsZRVBFY3rop5wMmfFHDFd9CGZmlPV9QfWRaACVhtMY="}]},"_npmUser":{"name":"20dec","email":"20dec.20dec@gmail.com"},"directories":{},"maintainers":[{"name":"20dec","email":"20dec.20dec@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/30-lines-telegram-bot_1.0.1_1710384881543_0.5883758997198381"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-14T01:45:49.512Z","1.0.0":"2024-03-14T01:45:49.678Z","modified":"2024-03-14T02:54:42.139Z","1.0.1":"2024-03-14T02:54:41.696Z"},"maintainers":[{"name":"20dec","email":"20dec.20dec@gmail.com"}],"description":"Telegram bot in 30 lines of code","homepage":"https://github.com/20dec/30-lines-telegram-bot#readme","keywords":["TELEGRAM","BOT"],"repository":{"type":"git","url":"git+https://github.com/20dec/30-lines-telegram-bot.git"},"author":{"name":"20dec"},"bugs":{"url":"https://github.com/20dec/30-lines-telegram-bot/issues"},"license":"ISC","readme":"![Logo](https://github.com/tryshchenko/30-lines-telegram-bot/raw/master/icon.png)\r\n# 2Space - Telegram Bot in 30 Lines of Code Example\r\nYou can try it out on telegram - @tospace\r\n\r\nThis telegram bot is a little bit more than standard \"Hello World\" application - it does something. It gets the information about closest launches of spacecrafts.\r\n\r\n### This library was created to illustrate a bot creation process as simple as it possible.\r\n\r\nI have created it as a demo for my presentation on IT NonStop Wroclaw. Links and descriptions are going to be provided when event will happen.\r\n\r\n## Environment\r\nIt works literally everywhere. Server is not mandatory - it works well from your personal device.\r\n\r\n## Running\r\n1. Register your bot with @botfather. It will give you a token\r\n2. Create token file: `cp token-example.js token.js`\r\n3. Place your token string inside\r\n4. `npm install`\r\n5. `npm start`\r\n6. Enjoy. Just type your bot a message in telegram\r\n\r\n## Warning\r\nIt is not production ready solution (I know, it's obvious, but...). In real life it makes sense to use a way more complicated algorithms of language recognition, not `indexOf`. Also in real life it's a very bad idea to hardcore URLs like it's done in the example. Only morons do so on real projects.\r\nStoring cases in one folder is not a good practice either, some architecture is very helpful. Just imagine it's kind of router and cases are action of controllers - with such abstraction life is way easier.\r\n\r\n## Credentials\r\nData is provided by API - https://launchlibrary.net\r\nIcon used for application was taken here https://www.flaticon.com/authors/smashicons\r\n\r\nProject uses 2 libraries: node-telegram-bot-api and request.\r\n\r\n### Thank you for checking this page.\r\n","readmeFilename":"readme.md"}