{"_id":"messaging-api-telegram","_rev":"96-1bab41d324d9d8950784b4546a9b60ec","name":"messaging-api-telegram","description":"Messaging API client for Telegram","dist-tags":{"latest":"1.1.0","next":"1.0.0-beta.34"},"versions":{"0.2.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.2.2","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.2.2","scripts":{},"_shasum":"dbdc0c34082b6326d7bb5bc60b8404a23626c939","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"dist":{"shasum":"dbdc0c34082b6326d7bb5bc60b8404a23626c939","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.2.2.tgz","integrity":"sha512-kfmL6vOJs1y9V4H/+uiytHtzTkp6yWfYXmR1NNZq+m+52Ck4m+6TfSCO0MgxTb9uTuYNnM1jiTmd9qIWXryoxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPXc7BEk7ev/iFFav/IPVlThfadlVg9Ld45aKZ5RZx3AiAS/2j5+ZQjBTgSEcy0DFkLP8DN4yYY+dlwQM2puEc+fA=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.2.2.tgz_1499741073487_0.6844434400554746"},"directories":{}},"0.2.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.2.3","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.2.3","scripts":{},"_shasum":"07a25dfa1c590aee7d6f4ca6b8212ec18b096cfd","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"dist":{"shasum":"07a25dfa1c590aee7d6f4ca6b8212ec18b096cfd","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.2.3.tgz","integrity":"sha512-mexPEYV8ZiSg5EAQiije4ajVWT6GYCRmaueJeD75NfY7On2AiD0RXcFHNBnEZlx6xhwBNoim8neYhu/ikHdnfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsdxG5RBpviKidMFfMAV6Y//4XwQWJ4fC0vdkOlHrwBQIhAKY0J4RyYE2jPd9bH6rHBLdn5Tk8/CQbYzZrs/snFQFg"}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.2.3.tgz_1499927735650_0.7268275860697031"},"directories":{}},"0.2.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.2.4","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.2.4","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-Ohz6x+tCP91lPpZz0ncZuPgcu0c/15TqCMrxs3Yx1VnxE2sGTzDbjOUccxDX8DcPaE3DGxZrnar0+igLgt4Ryg==","shasum":"690a39e60539336b17c6a213e53a335773adac26","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.2.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9fEnsLf3KGA/hPSRYjPeoaRPCVVVZza1u8x5F7fjSAAIgbVW/62dZ6ya50fmiPfjlIGdVnWSaMZkNSIlZNUOOpew="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.2.4.tgz_1501661720548_0.5453772328328341"},"directories":{}},"0.2.7":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.2.7","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.2.7","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-3u1IC/wKoGftf+Ipxkc9/DmHqrNGJw1O889OK4asy/urFb9Xl9oanK2HYVujpdpsT9dQ6a53LhlDVS9YoxMdNg==","shasum":"c2c7fb8fd9c9a5c4178a359d9b3186c88823b56d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.2.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+WO3Kt76h8LUCkFCZPCT9IrXi8MiJ9ST86gZ+tTp/0AIgE5nJngMscwk/gW4HH3NzAi0G3+OGbz/01ETmgVDHaX0="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.2.7.tgz_1502943920718_0.011438232380896807"},"directories":{}},"0.3.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.3.0","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.3.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-7V9i3PXJtzA4gG4MEs09osmegUC22oKjaR1qCkBHrsAcVTZVCukdt3Rslsgl6cjLdbxhuQtGQ7quKg9Tr1KPXA==","shasum":"1ae3949806f1ed701ddc3e9fd9a41ee676e5734f","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSSSCrml02pGnj1Si1sN0YycfOYKY+DqXDDbCex73v8QIgCnL9NumxBQMjuEE2/bEUG3esRklwm4pLxR2dca1/9YI="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.3.0.tgz_1503992208230_0.25308298924937844"},"directories":{}},"0.3.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.3.3","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.3.3","_npmVersion":"5.4.0","_nodeVersion":"8.4.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-dKGu1q25u87FSvR6UhZlXvnfxypd6dGpXrnTZdeK+/Ur783RFFRpvZftU7ki1LATCaF9SdSzHczd6JviMB+w+A==","shasum":"74eddebd0b5f76dc6047273df8fe7cb572299f0f","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.3.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6g/tAphXNjfZTKcxm9JzfpD18KeZz5vFbspQt1oT64AiEAyKvQ/e/WYDtkBbEPtBF3GMaa6oi7VdvniROsFOsxbso="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.3.3.tgz_1504770548448_0.9083104629535228"},"directories":{}},"0.3.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.3.4","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.3.4","_npmVersion":"5.4.0","_nodeVersion":"8.4.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-3rIHLK5yjl1u09SjFJw6VbWMyAfLPYgyOtWJgCvX7vMEqWHnafDNzkzyWyToa2YTZ4fqi6tA2gB67DAwOLDt0A==","shasum":"9437444b96d6c93929735bd0ef3277e652ec067e","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.3.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBz3HTraExo585RzbT9d/ciTD9TTLDDFhoT2rj7rCYgAIgY6GvYGaLWuImf64tUwXVY3TWwwices69YYsXODvdPQs="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.3.4.tgz_1505297683203_0.6148593020625412"},"directories":{}},"0.3.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.3.5","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.3.5","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-ZgFgJMOugxdwgzKgbF4i2SIerncBnPEgCHvgknKY98u7q1sT/2NWozOWdom9rStomgxVLc4u0/bvD2Nw8ilwqA==","shasum":"028278e682bf154fa685dae5543f53a67f7f7e18","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.3.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZaEIy/PSI7iqZIUpEjeSRoBsemdoDrpH0oclbsQ0dfAiBqTzfYiXOtweQvExSGLLnGYJWzs0B16TxS8BysHXbzVA=="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.3.5.tgz_1505405717659_0.7489378529135138"},"directories":{}},"0.4.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.4.1","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.1"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.4.1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-21a35ExA5NZs6MpTaRCAz6N9YtnJBdH2IglsN1Ff653Iuzz11DkfwVEyl76VIcPGaMZQVHje1fxSWgyICtESOw==","shasum":"39934a6c7f239bdf62ef438632dfc49407f87523","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.4.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk/YcM+qtRSL2GnQXgFbrS4/eDf8W9PyedfCOfHjh/1gIhAPjtpxODVl4VPCyFrb7Q5be7I7d1HaTUxKqUae5mu2li"}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.4.1.tgz_1505819879689_0.6934250881895423"},"directories":{}},"0.4.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.4.2","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.4.2","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-U8bMrIQihJd5CD3EKspQyY1zBzhsOv8tDa6bG6uuf5Eb9bxxJUA5VqQNiR+98Lt6Zg7GRzpgTqNLvqgnONxy+g==","shasum":"42589c6f8c92ed8afa24472ea90d848b7d6f7929","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.4.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkqUEieUlOOZ0lSjWDNSA1/cP0nTO0Ct+JJzYEBCDiqQIgYkVN0SDtjwjP3LO64L1ltJAoo/ZonktWAEzGGr5T2mY="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.4.2.tgz_1506044612316_0.12693613162264228"},"directories":{}},"0.4.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.4.3","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.4.3","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-S6qMT5RbUeo3ME7oaDksiEWu/i/u011fCx9HcSYnuCwKeaUMSKEV0fo9uR7eOzl2D1qPXrKuhr506EmkXsZ2vw==","shasum":"fa9189498f851fbd2888f38c3bd40c768e359ad9","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.4.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAaiknXmcuri0EjLIbbSGqPaBdwbgUZrgtK56X2WH5EWAiEAp/x0dMesqN3CfaTIiZ6h30vp1QpPj+MneMlRMnpVVS0="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.4.3.tgz_1506574452122_0.8449610825628042"},"directories":{}},"0.4.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.4.4","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.4.4","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-NKCB9ysr50LOQBLLzzmP3NFViqmpOcrT8b+smmhJPMGiI3qlmFGcVC8OM5+XN4dXeXKWtqfFxL0jG7gn7hkUJA==","shasum":"8391557e91a7055ea398ab2b553ff289306502f1","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.4.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTzXEN2X0zaL84OVad1Tl+g0i8iXLmGC0EUPJc8Fp+WAiBduWbbUVgTNRCQI06lX98trJv3nkUOPKlm9xBVFIuYFg=="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.4.4.tgz_1507709003742_0.6526363515295088"},"directories":{}},"0.4.6":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.4.6","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.4.6","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-HJAvdxiU26/oZjzhHgs2KVVUPbRlTtiwbDxvtOGlV1eEE3iUHhwvGofBTxDvihxtYv0fkx25GohB1UokRu/NfQ==","shasum":"a35c7ad291ebd4b84d1a1a0d0b23801bfa7fef34","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.4.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBMGTBxq6L7QNpsjEpdX6PK7aMu2rFyGJ/iJ5PJUrB2AiADum1BQ64snX4ozI343Z9X2aaEDG1X/mxArKFwJ8n0Ig=="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.4.6.tgz_1508054344338_0.5412067414727062"},"directories":{}},"0.5.0-0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.5.0-0","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2","axios-error":"^0.5.0-0","warning":"^3.0.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.5.0-0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-XcPowb4QbJ6gBSMnrzNKEK05g330PFEfuTPbQgfC4i1kObJO4dpdB5kFz9tM6IwpuO4awVae20va0ELzr/rA3Q==","shasum":"69603f518a2002be518244638378e2b2a391e34d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.5.0-0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUgpf6oHdbNb+3xwUIaRqtvZVwqKukx74XhPGBWyTgHAiAQTk/gC9bFR6YsMHmjSHSgtCGiGtba8nVI3ByBG5LBPw=="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.5.0-0.tgz_1508482616522_0.4683707661461085"},"directories":{}},"0.5.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.5.0","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.16.2","axios-error":"^0.5.0","warning":"^3.0.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.5.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-uS6C2FVv+OEsmnBd+88qkO291AFl7TCeXbKWyO81h1eD1G3VjxEYrMv8tQB62L/KKbibV1MF7EFrmMG8swTbIw==","shasum":"1ef033e5ac9768724f72609c4c465895dad5b0d5","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.5.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDXeHhJNRvmbhzUvBDw8K6uZ312hGhyuguH+R23FYtOQIhAKzug9F9Cs5tVKMdz5Zq98KH6afvLOD1SjTkIo3euksc"}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.5.0.tgz_1508483917699_0.23425886244513094"},"directories":{}},"0.5.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.5.2","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.2","warning":"^3.0.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.5.2","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-GX/I66NiViXuP9xJGHFUY4xGe5etukzGXCozhXFhb5AbozqiB9u0zMVEBRkeKTBW/IxTLOLMMnoFuIdNX0VKBw==","shasum":"1d8f3dc01347a64c8969ec85d8eac5e90e98e9dc","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.5.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMEf8kjp7p99mShvmMldPOCQ63BRvqWoeJU3Oqu0zpIAiBx42O1Q+DK7TipqLv+u+IL9aT4ZWyv5w5hYynmYjvv6Q=="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.5.2.tgz_1508990949502_0.21321761631406844"},"directories":{}},"0.5.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.5.4","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4","warning":"^3.0.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.5.4","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-oySPzToleOARzR4noBGyaKOWfM1NCYNhYFpLW9QqKJjuX3gRq2pEZFLHJqIWfNoGwFa4NBvCsrlGtzpUwpZftA==","shasum":"5ff40a48279491069f72f02f0b64b20753462995","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.5.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/nFsdFKNXRmoi1wvlSXYK6afJi2LCRjyCvc51MdBAHAiEAvVBkq6e8BKajUL08eKxZ+37IBCm+LSe9OQdDYBu/QCQ="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.5.4.tgz_1509341097731_0.16892288136295974"},"directories":{}},"0.5.16":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.5.16","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4","warning":"^3.0.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.5.16","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-c9W+5duT3EmA1oZpV5ZsP2sL3DgjnuyP4Q+qGHTRL5cm0Y4LtBy8SjOnHpw9DegWfHpeW8fdSWNxjtmS+RuE5A==","shasum":"d002435c423a672910a64e424afab6dcf816f390","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.5.16.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJnMx4rhIaeKvKuq5UpI5sW7MpwotbLqqpCVp7AOsZCAiA4uFB6Iz8ZzPNlG5nVkdXkvlIRN5Da53GJEAlrIcFH+A=="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.5.16.tgz_1512460161382_0.6978164166212082"},"directories":{}},"0.6.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.0","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-dF7zdL71RNmyldGiGRmWGrYBr3evSehWrL7al+WvI5YkWsbUtKlSjhwgJmxnvxIMRhD2WopAk3Q+g5HrICRw1w==","shasum":"0643884396f1a5132de2c01d020e1face18869b9","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPkGTyL7POcz1s6uDd8JJFbGbC2YmKA5yPKhh0npf3RAiAECqCLB5efV2uVTdZbM917KwYzkfFaaqV4PBkBcMX0uA=="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.6.0.tgz_1512620025677_0.7086254246532917"},"directories":{}},"0.6.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.1","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-iqR+j8TjL3XpEcS98Ve8d4WN4NiIWu3SoGosx998v2OXjK63iRHkdBkq0fjQcNA2hsfL1FQ774aBrNXlyL5Aew==","shasum":"3c028f23a4cf5b2adfa9169cef5d1bd2e8e20377","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpK4lCcs0ZTvWYKw8tJDyiAS231V3dMVvsMBoTizd1UwIhAMoUV9sSH+K0MjDdt4HkCYcNsvtDw7qhOoW3KkHbPWUM"}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.6.1.tgz_1512746359997_0.2576378125231713"},"directories":{}},"0.6.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.2","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-vVFCgCYZCc8uKVVIZSU2kYtURagJsrvNq3fK95CdsnRg/HMoaCKuk+gL4KlKJs0wJ/QZ+l1V0uPyTvoL3s9tOw==","shasum":"aa3663eb9a458d145e119fd383047557bd588bd0","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuc2HVrh1CUj9b58VmvrmCOSZOawKOYsymHjsHfq3hGwIgUwoY4HyPvqoN8HJ3/WvlqcxsivaRwxPveGmlBWaMjWw="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.6.2.tgz_1512986644710_0.5467583478894085"},"directories":{}},"0.6.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.5","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-ZUh1FeyhejuhWoaUYd7bkT+no5QgcFXYKkVpFnCsJHlTcekZKUMmn7iuTsADz+De3CTAk46wn0Z4IWnhwMGoyg==","shasum":"cbd9b3daddd6bda129adc60dee8c359ab37f45c9","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkWeHKwyONTAubzdz0ZLxWeceCEnlotLz996VA1iYsMAiAHstqqiPnU5e/UbHnPt+BkkXh5+tTqH0RJPh1xBkVfzg=="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.6.5.tgz_1513741026984_0.34133284632116556"},"directories":{}},"0.6.8":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.8","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.8","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-E95ehKNjq12hJ8guEpbhnPxeYNyWBdSZQmzFwGn7uXJnmBK+e7bddIms3Co0w8nDvLXKZLUGCokly8uKZzMZww==","shasum":"2fd87a0f0d59209f2829fe862d95297f59ca34e3","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9e4FMJM+ILGK9ThDuxjepi7kzLKvPRxKMh4m7IdP0FQIhALKWjjPrWzjmiEJS9yEBUPZerOi/sFjHsLrhvciIc2Cf"}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.6.8.tgz_1514176329110_0.7708734953776002"},"directories":{}},"0.7.0-alpha.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-alpha.1","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-alpha.1","dist":{"shasum":"b4d096a671fca07bcad74979ce850148fd623915","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-alpha.1.tgz","integrity":"sha512-QJHh7YkaLslH8bxs4kym+BM9O+hz+G4KGczx4+moVWYjj9M1rJFHglNATxRBL5qDKzEXj7q8xjfn9OZpKnYBKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvsn3GtcyEUuNunkvd/PK3IphNPO5sFI+SRFsI/W9GnAIgS+O9PqMlSxtSFij6mcc2uciJNpZ0emqGv5uhaJenbaM="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.7.0-alpha.1.tgz_1516602988722_0.3158447779715061"},"directories":{}},"0.7.0-alpha.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-alpha.2","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-alpha.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-alpha.2","dist":{"shasum":"62787912e7321217e43ab6c52d5d8cdac8306f7c","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-alpha.2.tgz","integrity":"sha512-m3f4rXcne55B2Fd+3q8SMU096mTtgS4x/vQqAtaeyG/LY8S3uTTGOA8GIhPdFtZHT3SL4TkC9QDwZofprUT27g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXA6kzqXm/MtQQIRMetYPaiVNKkV0temF3vRc2D2pfjAiBDHlrHf6bShpsAQC+rbWZ/mSpSPI3izMQp5VQcXygrxg=="}]},"maintainers":[{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"chentsulin@gmail.com","name":"chentsulin"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram-0.7.0-alpha.2.tgz_1517796321026_0.3249308115337044"},"directories":{}},"0.6.13":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.6.13","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.5.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.6.13","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"dist":{"integrity":"sha512-qR6XU69ZMEVl0+V3/NT4MR5IqL0iHgNA4SOXb+/TBxv0eiOi9/MXudnBMTEOawdv451XXiOd9W1uSbucmbsp2A==","shasum":"61b2137d80bbc34ff7e6c0b252f5bab14ecd2547","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.6.13.tgz","fileCount":11,"unpackedSize":126508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDrWSAhwkxaN6n8RSEU43y5OoOLH3IE7nWPsfbolZX5gIgc4OvwuajIQ3BZg2wyz26OC6zZ59OUs7C9ZzOU3T/y/A="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.6.13_1518422608249_0.5638491584554921"},"_hasShrinkwrap":false},"0.7.0-beta.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-beta.1","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-beta.1"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-beta.1","dist":{"shasum":"aa712b45aabf75833b7cfb46340434f2ae5fed61","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-beta.1.tgz","fileCount":21,"unpackedSize":131305,"integrity":"sha512-6McBZBkwr6SwirYmODONFGpDVGpYE7IMFoPFNdW22i99nDGPrbwLkOV4IYLesoYnNgdRXJpPby4WJG9yvxLmGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYjkov0lGIJ3PbfVrwuFA/JB3cdhYALZM1vd57aOIz0gIgYvE13BM2uSG8PmQS9jDBy2gEagxuXVWbY69Xwz8HQWc="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-beta.1_1522054766424_0.7778100218883681"},"_hasShrinkwrap":false},"0.7.0-beta.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-beta.2","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-beta.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-beta.2","dist":{"shasum":"e8ab7af7632f9af7977cff14ef96d93fd95cedeb","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-beta.2.tgz","fileCount":21,"unpackedSize":131305,"integrity":"sha512-indSpVapJ95/SMuENz3vbsDgnY1dC2FAkHPck+0ThnsDCpPLbURlnZpdZ9rwIlxVPwYVEK+1vWvwkmGXsCtynQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxKCTiFYi03GZJBsbRnC3VdnMirkQ/ILOHsxIPJUBlowIhAM+m6TEKi1m9W/ljqKm3NctOZgR3FY+k9DUF2QSI+N7d"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-beta.2_1522224538920_0.4101000998584121"},"_hasShrinkwrap":false},"0.7.0-beta.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-beta.3","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-beta.3"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-beta.3","dist":{"shasum":"b9ba081e20153e2d6bec1de18a6f055697fd3e40","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-beta.3.tgz","fileCount":21,"unpackedSize":131305,"integrity":"sha512-NQIel2vvojj/6YmANYGWAxoTiZ0iCRg1C3wuQwcLsNbBqpHtFfMb7BOo072lgu93wENRvtzJMDRBBBi14cYspw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBykrH9uh+eWkTo97CjyyibfOUTon6MP96a4S3cWPS2UAiEAiozoifJxGji/Cq3rX1tAMjsEVJJu6/jvOH2ojcZcRKI="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-beta.3_1522650419240_0.8140046386226802"},"_hasShrinkwrap":false},"0.7.0-beta.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-beta.4","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-beta.4"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-beta.4","dist":{"shasum":"045cb8665482569315669da1ac6f7ea9714b261c","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-beta.4.tgz","fileCount":21,"unpackedSize":131305,"integrity":"sha512-ajkr/RZgfQ4oUSbYikwLqoQxGbKUwgFZuF/QIPA/iwXDzOiDSA5cvSZyrAprW9BrXKJiMaEwhsbcP/OVYkUk8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpQMQrEkeLx41shqt+SRD8uM8SyICeRwlY2cF1k3YR6AiAv3XeWL4q+vUMi83aFHPteZhBfXTehjRa4R8HoiAuaTw=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-beta.4_1522737598793_0.9564879069589713"},"_hasShrinkwrap":false},"0.7.0-beta.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-beta.5","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-beta.5"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-beta.5","dist":{"shasum":"20f25e9a79f6e6a7a3d61d170c1d2604bfa583c0","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-beta.5.tgz","fileCount":21,"unpackedSize":131305,"integrity":"sha512-kzfjTmswTUK4TLDIL9UdrlDlf8gWp68osrN8MfHmrYk62ZcP9sjxRNWOIjYSP5O++VVtYAf86reI1I8smBnPhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrzqAU2h60joeBAkWXjUfBelHlgJ5L5jGSGC78I8wL7gIhAM3/e4Y1SpXDVlZbFy32jYpvaUt/2xGTu1hENE6xF9aO"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-beta.5_1522748375349_0.012156181584255688"},"_hasShrinkwrap":false},"0.7.0-rc.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-rc.1","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-rc.1"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-rc.1","dist":{"shasum":"d7aed6132a1beb16b3884ae91ed651d857013176","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-rc.1.tgz","fileCount":21,"unpackedSize":131301,"integrity":"sha512-BZzODDa3d/AeCPXYFkMFCictAPzudZxjekp84gFMPf4g+we915avpvt4E+mUBdDSOIKsPqY6WcRCVEhVSgaxDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNjZH6CrKwd9muOWyvrBuAXmSZMhxJx/DGzbUCT6dUjAiBAtwWjXxLUfGRrflx+kvCzFkmZGepImIaZShMUMMA/bw=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-rc.1_1523261660600_0.9695782591883526"},"_hasShrinkwrap":false},"0.7.0-rc.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-rc.2","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-rc.2"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-rc.2","dist":{"shasum":"a5c87568bc9e8d4ae7c109de2ce91853d0063a49","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-rc.2.tgz","fileCount":21,"unpackedSize":131301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1XXtCRA9TVsSAnZWagAAgvQP+gJ7lxp51tFK9dfOV1By\nKvp69xKEmSzBTpmd706RMayPivVnIqUhqz+G1yi3GrF+Mecj7xraFBB73bQ7\nWNNIkqNOlfnykjLkojSYyDf+pITWfGbhyUSHiu7piqxiSU0kFEaITtv4Eish\n8hLoRyRHgH+YqrtPP/Cwj2By4+T8qapM8Y5d/90w+hYpbQqFZBuAminUhPUC\nwRa5TcyAbn6t5M7tv7uWnojdSJQtdtKhQfg33DvIoYXaNY2qRSTky+AmfEZV\nL/SiH2Xb/AhHcHfmTYJgMI6OH5XMzbhD92iKjX6ZJ3Zy9bdH1vzBdZaXKI07\nRD25Gv2j82fFYFRBnEWTklNIyUfptGFvQRoHNsTcjeJyuDE43+sRrld7fVJl\nmEGVjNqIrS0lVqc3XN4J8sf1A2c/ZgnaiSKj1IBTQIeMwwdsR5vJAbQ56q1n\nwBHixYoo9IMxaLHIkxvkUxLFKW6nNUmrNdHZGM7UFghtjh6wA7XQs/bjnOTt\nogePXA28J+tgGa2/qGV9UsNODjF32jaDqt2QKgWbVYx0U1k17meoy7L62J6l\niypy+yXJM+Amg4Wjt0DGL8kNx4TxOeqR+8MMwAvs0TV2YGYy4MJQJWf49VDT\nnN+jXB5khsv/o3vKt4Mn0s9zipKx2e2N+5M8MROX+Y8ZAmxF7kydTJeDEU+1\nIUDG\r\n=xa1C\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-0jBMhFrvglK2AZYFw/3mS9jiff23K5Q4NOBm/NmGzng0HTYGRXwuZpk0I1FaObHpK3LZw7iBng0s5aqwJzsHCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF24l3bvelI11WhkC8xOVAFWetnrKEcN6ldjNrdNbS4IAiBpwW/RScqUGAZ/KBa2AGJYckXP5b5nbcMeFACD0bJhHw=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-rc.2_1523938795818_0.3432944898255863"},"_hasShrinkwrap":false},"0.7.0-rc.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0-rc.3","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0-rc.3"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0-rc.3","dist":{"shasum":"7067655df368a359bccbd65bf4b159d22138d9ca","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0-rc.3.tgz","fileCount":21,"unpackedSize":131531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3qoRCRA9TVsSAnZWagAAWLUQAJy6/6kFecN6305EtVce\nvo5Oad1c6uqJX42cz3d4Awtok+Ed4PpxBSgMeIqxC9Q9l6oJJEKBsNbYaNId\nNVf7tHm3rSrIbp3eGTXFL9NJV9ALvCG05bCKvz5lc/ZuSAMmQFzrrHc4RVtZ\np3dRauxn1DnDH0i9TCDa7uqbYP5FhL9AVi4NUl9/1H/HYO9I6s7LlFgHhejC\nAblgnE6Rmeq528l1HkTeBmBr8awtPnvcMUv4zelcoU6z7/5xgaGmOfGlOVnX\n2vWuXxz31YUVzCOHbm2XDybDPtUwrYtm5q/QHAoQ9xqQAFr+xoLNjeDKkU5K\ncls6cb6qbz4I4ArqLfzRIjPIUVJI+9kCT4IWhvpojeYKbiDcDzrru5W55uTh\nkyiWx7eVkSJnvbJcBDRM3ESvqh9TG/9Bgk5zE7aUaNWeJEafaPvbQmYsmeJJ\nSpwiKYuCoCXnr3PPfvruEO9OqRVMV6if7MceO0PV5yywjvdWDgpPvcyRAvDo\nqOnsYAp5x6AT2rOiOVfWyofUMEfHq1vzCdhW1mdOv9dBBZkg0zXB8ChMGpKA\nLQtzwdbEOB7hQ4GptUTTpDOgHAaqQnvD4zHqBTR2TIMkubrNuZHDT2mbfqRz\n0x/yXLpCpmUzFVNw8ocE9W/G0khIJ1t42JimVh6oXz4BFaLdn7mSCzr6J0r4\ndsGT\r\n=ZukS\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-IRX8e/g9ca+68g3iBzYrW+hSsnLxlwUVJNCCvzJNGqyTRc6Q4SwTQ/OpEB8vuVnrRtc1epQZsCIn6KhuKjZB4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqMI410L2qyc4EdHYqK+Q4lo22q0KmFJPAD9PlRJ+XbQIgIUNBu100x4OjDKEfdrHVo8NtlPZ0UdLOZmVgMbYjMR0="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0-rc.3_1524541967352_0.09531775914166274"},"_hasShrinkwrap":false},"0.7.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.0","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.0","dist":{"shasum":"7e648afac597a0b0ef75ad047af80e0727e3d90d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.0.tgz","fileCount":21,"unpackedSize":131521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4yX6CRA9TVsSAnZWagAAjrsP/1flyzuTE4UDdlZGV9eA\nb/+aIvoSgGwZJbNPBrUvRMIV4XzvMOm9e8sJrGn3Mkg3R4jZ3GoWe2WUF5Gw\ngmoygsSxnkUrjrZJuBHMvgbTsxZZeEpAZtfwsMFKwAgaMNtCwSWtW1CKk36G\nFm1dUDlCY9PS/CB2sZoaMPLM4sMfe4rFwINvrKvhELYdfVyrgkjz45p0piYA\nlhvY2pvnqLrdKS3+SAwg5kQDjUVpxYITQjZF1rLT75AL47UIW+tFSfjFgf1z\nsNt0/4Pw3sbd2soz8nBXGGwFm9Q+c8PWG8DxEeEa5rtQPQ2n/3KWLLzndp3t\nI2WMgwN3jaaEy3e91inqdlmMAzsvGBRy27V6z7Lktz+iLpGXKwqE0pB5pxfx\nUlXRjx1XZQRxYwBHBIOxospwEgq0XG3W+2E4wK+G0Q72DH2ucUlZJZiqqcUc\n5ncyM5T7EMu8ylypA5hAL3WLOo+dS8aar0UMoJdQS5ukEt7RsARfQH+YTI6e\n1qClaV2TFmvi8HKY9KWZk6uh52a3uyfjeG+OdB0nup6hntWIVO8QLUFdpmiG\nqZKHg24wdHfc+DvIrpeUG9fXWaLtl234V1U6knLJNd1uXcBCP7lV4aCeYQpN\nXHoU62/D3Vr77hCkf1XbgglYQ0VLTOI8YQ1U+ZJqlA4n/zeeREGPRi0K8ITf\nGUm6\r\n=gkaT\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-zVKulMGXL85dtIDECvd6GqRCuWblaR7pmSgiJ2Zn685frXG5ZFWsyqei4xqA7HB6yl5y9se52mnsY42GJewQNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF1kXPvEnO7Zt0sxpSsU5zwnhcA4thQKgHUcJR9sRMARAiEAknM0YesUuXaDVP356bFWChFc8tUAfjvQ/rnlUXKHsys="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.0_1524835832788_0.7694568612803674"},"_hasShrinkwrap":false},"0.7.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.2","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.2","dist":{"shasum":"dba75bb824938fe1a266029b282161bf0734eb6d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.2.tgz","fileCount":21,"unpackedSize":132167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGgHsCRA9TVsSAnZWagAAcbwP/jj+d879WxtUxHw1IN3R\nrdGB2wKWe0Jl/hc8zowvA+yH7InSXNeAHi52YTKYIuwDdKOPxhOKaLDbghmg\nzmZtGGVUHb5ozKjNaHRJH51ifkzxdFhlBJnfHgkNE4qXhTpzkUxUHg0iIfpy\nY1D/mJ7VFrDQjhZQBSaDZo2rkf4J1Xp5G9Y+/9q9JegqQST4Kcs8ho+SQzVb\nW33qxiC0lKHlQt18xOFniS2lgr3evppPVIyRVdw7pvn9Q9SbQH0gK7pFBlUQ\n20gK6oiyxBYt9PFc9FwZs4jqje3Uh4PToXEOKW4n/mAkBHxqe8+RhO+exJtS\nU+gtVhoJ8ZwyFcTCDWziIQsUW7bwGjIPc5cXIQYcG/wGHSVNRGRrBc2ALvrw\nBDlDefu/4/MJkOxsa2WHrgsRHMhJnaeQI4Z9Nu1wPzFEG7AYTpSN0LxjLlsc\nqJ430toBUTUcsJUyBuNNyOd/ybZbFVnTGDMLRSYTOgOz7bTEOLzZTuICRNbO\nB/6bVAevNEa6kv7Bpl/jrThpnR/g4t4FyVekn4XKfMNm8BVvOMu46kRKcxyU\n2Tt1/P6tLwdzHZVln1yxIJNLj21Xt50qZlG2TL1XJ0BJJX1iI+dUtPz/reyA\np0varHNtwbz8imxy7tAanK0uWYEsZintyukFozRQBEK3285Kwi7IWXUG69Dx\nzB4p\r\n=VYvl\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-nLb6dh/P89hu+JXTLDmWU8awsfJLj7jtSWmgxmDvIZcBqNdgAeuI7MYVfjv5NaQ4+LUtQRA+IY6fAPShC+5IfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/PnEs32e5DAIUTcUNITW17e97Qj/YsZ1GJClFhCSxTAiEAuvddDoslMamta3kcXP7yY/RQL925bTWvB/hqd6KCEXc="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.2_1528431082340_0.01471267241127161"},"_hasShrinkwrap":false},"0.7.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.3","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.17.0","axios-error":"^0.7.0"},"devDependencies":{"axios-mock-adapter":"^1.9.0"},"_id":"messaging-api-telegram@0.7.3","dist":{"shasum":"8c6712537daf4b12412beab67a38d9ea76ffacec","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.3.tgz","fileCount":21,"unpackedSize":134430,"integrity":"sha512-UIr9PAqcSnH1Lf1+EO6DargInczVb0WtJ8c7OjA0ZmVZIpNXN8jQIhlqkuQUCe1LPbHIy2EWOUXxAMHL3F3usA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC834Y+HwA44liiYaGoPMIwSEpPOySwiwugCG98qr8KcgIhALl8JTxQ0Fbncw8ITpkmJ3tujUIq2KqZGrbvCpfZ/6BD"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.3_1529380804435_0.9875477666436183"},"_hasShrinkwrap":false},"0.7.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.4","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.4"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"_id":"messaging-api-telegram@0.7.4","dist":{"shasum":"4b55b504bc948aacf043e627f9585d0c8a502cad","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.4.tgz","fileCount":21,"unpackedSize":134600,"integrity":"sha512-WZ4cklSPfhNNh2VCGW01BjhQ9s+dHp7Dokxvwxd9PMKN5nVM2c9E6iu6RsazpLe4jLLLMADMG0Vu+zKR5X77Sg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuforyEGiCCF2Y08sUT3QYPrNtzXk4qH0+Ya1NQ/zrMAiEA32bJ5/D3CrG+Sio1qezP//42ByLi3DCkV3o7DF4D/XM="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.4_1531368907576_0.6252672154034897"},"_hasShrinkwrap":false},"0.7.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.5","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.4"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"_id":"messaging-api-telegram@0.7.5","dist":{"shasum":"c2d3ba718a97eb2daa9445d3e8cf53200dbf487c","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.5.tgz","integrity":"sha512-Ylz9bNzm5g5Mu4O7N8LsrZLNZ9qNyS+edhlQfFbJhmun32YuOSZHzPybZV27vuCxX4pGOs6Zc/PR3vqc4g0LJQ==","fileCount":21,"unpackedSize":135382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZZoOCRA9TVsSAnZWagAAtGsP/0XB29RRtpYwjDgxPQ+R\nrtrwdouWv6KCxs85b6HjsqFyApRu+G+4LSWUG0Y0pLW7Tcx0bvde/QY4OqD2\nhGD2RVS4qwfoJ3FeVHIxhWuylSLzu+TY6BX4SDY/2Zt805jmgRCuZ9tdzwwv\nWce9iJSVquBVaOshgntd9bp8+1KoLqnWkCaYCnPw3/DlnUPj0zG3l/hxxyPq\nlaaEWLbMpCcibQ3jPSj4ILGJmpq/4+Y5UlSTnZ5uiQRT8QbhlbFCuI9nDX/F\n945ZVFljrD8Lao08LPLSyS7zjL4ncJK8YOHaPGAQ8LboBmQB0ymxJR78fp2r\nY0a9HI39J1y20DYoaOYYzXsIsxfObabl2U/ILd8rWRNIlE48RczMyOpfkrRY\nRlKl69963qYdCPcgURoouUSUAtFFOBr9MnjcUZ3Fwyh77RFkBMwsHITuafwv\nlxLwKD5KDo9DccEuRy9nX1aQJNmZIhwyjlRcSGDvwk5F04aiAuqncYjhsGpu\n/uTzGPb1pCEeYSxt4BRch6eHGLElNxVUJo1n+g89WWH34fmxrocim3GNQEvO\nCo2WQp3KAtwCzKLlHN/1gY+8PCJ5q6oSbF9kYnESkWfbPUYOdwOgn+kcKLzH\n3nnJECYeobZezVwtaWFtWkAi/0jp0pIyhFvMbjhLJSB3WTOWdk/intGYkU+Y\nR/iz\r\n=apFV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDg7+85yE6Zb2UotAeY3s9anSlg3jND/XtrUhqzj142uAiB8rayp8fZcjcA143iC52ZXCBW1t2bX1mRzf6zdnIV/Rw=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.5_1533385229557_0.979478346889975"},"_hasShrinkwrap":false},"0.7.6":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.6","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.6"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"_id":"messaging-api-telegram@0.7.6","dist":{"shasum":"54aabe1a053962276fbc8f96f92333a4183f4bc1","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.6.tgz","integrity":"sha512-QLMQzM2T5GRJucyC3dOSjiMN781HhluWFnAFYWuJXjOGPlyuHURJ+C2lZ/RG0I4rBIx5GvIE16sVsOC8gUkWhg==","fileCount":21,"unpackedSize":135382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfl3tCRA9TVsSAnZWagAAFzgP/j/8+40ntVmNWlCYkkKS\nCeJKKQJu0HRDXzV5Xy53L9z9m2eBhXqAYKbWnXWOxOyafz23F5c1uxH+STzl\nssyegpQZn+18m7IRaVDWUG1dtidzeK+qlENjtPF5qbK1apYYz7cA30vMjkXu\nsGSkt9MVD1W+PS2f4yVOWkM+QTgsB03rxmzGEYvBtabkisQ++W0xsZODUuEu\ntxGhtN9vzVBs0hdRYPYYkNlw83BKFf7UMbdHijswZaYTcSggP275+fWB1dwl\nPgj3GMONcxokEZVhvqtLGfk6jprbUsfBdrQm7lCPkFmaz3NPJsYxKkxaZFM+\niMOgFVIwwDxi+ABrJ7TeiSs65bXWl5AX764zvtEyYdCdF8Nh8IyR8P0s/wjp\nzOb3rsT35iM3OPvCKcvG93pl+J5Ih0ptxpIk0NR6AyF3jMsD1tvBslSLLcZ1\nmHJ7CKbxWrpZDPsrasXZd1BjG9/O1ble8Oxbi/3CWJM8eHIzi1GPa67Au6S1\n9G8AHNRkQyS7uSTIRy6sOZnSLlY64roXOCJmCVJUPLXkj1vIG4Ig33kdsuX7\nGAqe10wxJ5yrim+p0L6u5ayDbPZWadRGpinHPOIwAgPU8YwNGimKsb46we9A\nl1U+MqzM2K4dmAAtu5DkqB5hk4nwAB6fhNqa8gP1w7lrc10YYW1FxER/yGyH\nP0Pi\r\n=RiDf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk5gw32FabVqHgTIkdxyIVdFHPOpK3VcCK7aJ3zEDyTgIhALLGZgotREe9SFdknHlLa5mZH4lES74O7enWZiuBICK6"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.6_1535008236672_0.397715641155475"},"_hasShrinkwrap":false},"0.7.7":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.7","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.7"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"_id":"messaging-api-telegram@0.7.7","dist":{"shasum":"7790c39248c9c18850e18fc7d422dd9e091fc44d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.7.tgz","integrity":"sha512-oL/gr4XjEITLNoJAj/g2lQMOF1whJe1rNVS21oJY3B39XdTadRpd6sNc6dt8sliVSoM/UuxTSwmYwk/edeSphw==","fileCount":21,"unpackedSize":135382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnh6xCRA9TVsSAnZWagAAMGwQAIlnhjksMEPBcUbUovwf\nHAmtIOmtUNJL51NklNURAiVvRnwUbFiErpZpf2+vu5kahExh4kX2MmYkgEQa\nY2ggAXydRAdU93O5jwFhVy99Ds8Qx1obfdP5/4CaA9qUPG1UeNLVetBf5kdw\nLmRF7N0rsJI5euXsKN4cwG4VYIG+UMHCnEYIGQf781uU+TzHw/xweiriUP57\n0axy88KW7JoJTzvOfhz+iK0WcEAeHIEWZ1dIchIvh/wi5i5q+D0pWDm6Q/3O\nwa33MkO9QpGskTdyomBLgyPHGnxyS2URWV1SPFmeVfXaWL0H+XJQkm7DYMPb\nqikcZlVv+QlNWFCnS9jlENgfpdOXhfxLDYR+9nvdEAz8Yt19m87VCmCcywrB\n/RWbTFx7AsBAuU2s/uJmMhJhrIXC+4cSLq+kGLluFC3vqHjVE+jydK7z2WEH\ncn9vrBuWT1jRt4ZU5BQjuN9SZinHqJwKXJ3niy6tmn0vFZtmjhAA/+r6e+LH\nX75d37ddIaIgw1SLBpG805cct2j90sDZpIdFE+sEpMStZP5BqVvI6JsiiIVk\nPjBiMnaGDFSgBFCITI65H6M1gTYvO0+6pojrDw/wSWKnNLSumt8Y/Vo4s/XZ\nxv1HvGuIFeyi8CB6yLZGEZogv340649oQP90+z1dEfhsUWBS021c+3zuqIe+\n2jPt\r\n=qSCE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJVFYtAeEPQgMLwMzcN0E+G/eLzhba2xiDM5O3WqGsMAiEA5GIifeAPJHOoTSoh3l+njszWo1h9EFuf6SVlmXbZ7oc="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.7_1537089200606_0.6414781970066099"},"_hasShrinkwrap":false},"0.7.8":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.8","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.8","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"9bcc48ddb1c03d7fc0d883c5c8e0e5421cc3a505","_id":"messaging-api-telegram@0.7.8","dist":{"shasum":"da6cb12d029ea2e083e148d3f40b16df0fed55b1","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.8.tgz","integrity":"sha512-djHvBmW68Q1pvRQUkB56eZeOLta6axNJA1gIhCFIaZfzTur49BjTxmH8wCJD8xuAThyCb7vwMyqrx+QxSuyHjQ==","fileCount":17,"unpackedSize":140544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboeWWCRA9TVsSAnZWagAA5BsP/RxkKDxm5jsjdzqCqawG\nOShiXOOPHyjUCp6aA8ip4VflruDH2xyqa8JWi0haoeZb57haSStFBQnvKMbQ\n3Qzavm9QmcQ852N1s9Ga8glhq79p+nwNoq80lWwDzLVbMN0Pg838u6b6FMO4\nfHoVn64RrIhhKc5Ppv0zjs8cwD4a0RztE2rR/lNX8h9ZLmQC5xgBP2Q2JNnx\nyZjWRfTV1gGcwoe+cw/e311otFNv0wo8QRStEODTNR7fQtSzONz1Yh2s0L4q\npr5aDP6/essH9MtYjElgtY2IeJmocKa7pbJvFPDRXTnZ2FYkUEHRzNQNySJa\n5Mk8+58JwhvxrLvVyDizN93sQX4dhzEjYzMazRQzQU/wRTVHXYaSNSWEql6e\nDWNC1Vfb1PpPPesyvWTCk3EOX6kLMa3qHwv8waFliGVWGWn+0Hayr+I1gy5n\nUlZYy5uvEc+3Jl/4JC80OrIEKcT0nKPyzFg/F7lW7z+QWZlOztdLGMPZyg/Q\np3rnvAm418GquDFQNw54WcanzxljFSiqyKs9zLl6vRPRkXgd3pKLge0mmhGg\nZWiZpTmwmjC4HsGPJkJf2edylgpUCRYz8+qSdC+uqvoI9r+5VEYe+OeM1wV7\nTrgg3hS3KoVF2cd/pdnifUgX8vk9UTaer5jBK6T9PvvEG8T0znDthsyHdk0N\nvQ6j\r\n=tiZo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/sqPBhgeneXfdZsAHuT+rypXcgQiFz8A4XQcmR0Uv3wIgAbaYs/1CFeqFr7Dj1h8dTFjNku8K8XfS/e6VpCAnLc0="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.8_1537336725790_0.672822282796131"},"_hasShrinkwrap":false},"0.7.11":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.11","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"8e43618226e9c46216372b813d24cae3bdf9ed9e","_id":"messaging-api-telegram@0.7.11","dist":{"shasum":"647cd8aa3a2d9bef4692313359d6dfc0942389b4","integrity":"sha512-KC26NHijsokmy7jXsrbt3JlsUcPaLa2hd69b8+IH+f+y20f1beTLgcmKab5mtx9lLMxvLtMp2EfWkc9aSQ5xhQ==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.11.tgz","fileCount":17,"unpackedSize":140546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx0xOCRA9TVsSAnZWagAA/70P/3kDin2RyuDNlM3TqIyG\nyWMuSoikL+2o0Ds+JpwRi2W57jnHfo4E74WBsjdcJiDBBFL7WWAw6HrSLtkk\nYg6AWKC/lU9Sg6BwiedaJowlFaqgynbyM5+qTSHR2cGT9tlgxfExWLv+I4FQ\nBDNQEKbscP6GecWNNhmigTfV7HoyTn+uSDapytjPJR8dyZ9JgiAsxwgAqqSl\nAymeS2aNL1FfJ8Lt6bP1DUm4EGC/7Kfblj+PYyqR0U4XJYdBDtFanklpflMT\n3lox7qOLOlgnKcRlmLQonno1cSc8Go+otJXn71rf8j3+7JKg2Pjmg0Kkq3S+\nTTxc5Q3S3WQWmgUeEg9pztWJQquptMen8AjK0yywlomGauTzW7nhbRMSrzpp\nCNqhj5lTTgIMcLTjXNiCoxcZD57F5lpgaty5am4Dwke2J60E2Wl/BoYl5ULw\nonV7P9+1bKI2hvUp10WOLqrwb8fTAptEGfVoLzTGbpBt4YmuDpSoldcw4vLK\niC6pKKMYtRAjul7mDdbD7OhQ+iSjdyOD7+3NTa5VWMr1+9TQlkY4alPUsgIX\n2oOOcslQ+Dw5KukPkV+t81P62meoDQSlJwHJn3tDZ24iXCOPw6jX4RZ6JqQ6\ni9zXqw38DdzYKqtf7qxawmE7Z9pVozlpAYokgpS5ql/+p4SmF1ow14rRAJST\n7yHh\r\n=4WB0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUeWTvRmef1B2JTFGUEnZ6o+XxgC83Bq0liFu9rrqYQwIhANOMHB/SUjtQT65Vf9vQceSf0xO11+zZOeuV4Zla0K/s"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.11_1539787853348_0.37594851102430904"},"_hasShrinkwrap":false},"0.8.0-alpha.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.1","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"25786e1776d364de6a8a49e0f5b8a6a0da065ae3","_id":"messaging-api-telegram@0.8.0-alpha.1","dist":{"shasum":"035db95e60947f23a865ea1efbc4d6516d3af090","integrity":"sha512-oVbU5P2Y1mRXSYEqfRHN29vrT9aRYLnX6Hmuvu1YfhZnlK3mYy10dwQO58HgbsV0Ofr3qNrvWcsCMXl6nDnLjg==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.1.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUZgyCRA9TVsSAnZWagAAjusP/RcsC8DFCHEJU0W4f0KS\nthubHLd34DBfoYrNV/1lYURR7TwMWgrcZzKuXD9SIMb0bXRt4CfQ2imtKokW\nqlr0hxYFALj1dx0Gpz1hd4QswcoimWUdOvg6yiponeZjseEWYwK9A0Mi9lhr\nobCVDDcGG+bdWe3y8cItr38a0xQnZbR8FjQ1K3Jf6vRj/Lcpk33Z5a7Ax7j1\nWiEceBYdYyN9+cKATA2oxnoDn7C5b70HpcpBCXsUdeHmu8eTFVKdYs3C5nTD\n4xYnhryUhgujfv0kss2uDWvxuFxn1oZ5rj56E6NoLDkgaFyBDZmGbB7BXayc\nuUGgkqKlP7Ei/WNrHfw3aOLtT+5hwx+lUjqscDpjDbi24MEZbFJMt9ZcVLrX\nTQNFajJjRqlesboPgUlGnq8FLy65GHXDq4BCfTgKgOz5H4ZHS+ZbQuVBhzHy\nhfRM4BEk1q3Psr+911hUEtCa6qTnNKatKuE64KP0oHZ4Jh/QvKOg2ztTsE7Q\n6X6Z63kVn0c7b3FlK32YIJRMDG/qxxLwYuJqRNSiamurpC9zRUKhhtaGjwGQ\nxl5WSP71E9Ww9u8Jmi/rtyLkxn26CAzlN+LvHvuMoIwFwCwukVCh4cQIv6+K\nLsQZ+amE0GHdmeajSMnt0rhgyl3EN/XrK7oMEA1nF8TszQV8vaU8A+uwgus4\njnvh\r\n=Mcf9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAETW8NdWqCai+vZLi2JvEM5nwlbU2Igm+Y1Tm40NjbKAiAto40zdL/yGLMHxs6ELZxqSc9gAKhXo5OnAvg9auhvIA=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.1_1548851249891_0.14285426570432547"},"_hasShrinkwrap":false},"0.8.0-alpha.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.2","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"e62a49823a44daea60846201318790b1cf0e8135","_id":"messaging-api-telegram@0.8.0-alpha.2","dist":{"shasum":"089cb7edf188b034de89a308055dffead78e918f","integrity":"sha512-PED7abSY9uRbT/nxhgmGca1lvD2sWtSHAVWQmR+0EXSYDKKH0ijKi7iWYPCckXDRZJ5uSCwul95UI0uIxZ+4Gw==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.2.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccQI0CRA9TVsSAnZWagAA6yMP/0+rCVPXaCq0PzlRkqyJ\nGrxTMCkO2nQKa/X6TVCIqDmAQ4MN035uOCQa8cF3znWPYDHQs+u/ROn27FFe\nkXUkP4FIwNnY65DLSMXcrkI2CsO02heqy5KWhTwts+03ECFQg+swfij11pu/\npEHrYCWftWfwgKhIqFgGXBPrRnU61ackvQBMpRWojhQprX8gdatnx+SAJ8oR\nOgMAHpmdyZ4qxJkBsBkskIu/BltrG8W+z45eudMuz5prQjpD/t6W1xXTbY/l\nr/UbDgquDWP5PM0IxA6j5QnrhCYWQv83fEMevZXfkln0I3rxdG2rMKuoVvrR\ngNUpeJZvu6hWs/YIWRDJLA69XO3Ff66lH2+nr4FWKggRPno+JoxhTAVOeiCq\nyLps75G8/qAHol1BWSsDgtTxi8sIq8E+2uN+KNUSnkaJtUqnX4kBE5rBxjfm\ncdwbFrUZUu5zn3qSAGf7DxV+AZLAZCaG6ZeyqmbLBT8UwDqsSo/Im2AYhkPR\nomKTxhIsepSIbakNyjXyQOGEgaJA+hCrONVjYAmaIxqkUg79DE8QlYKyUVD+\neRBRjKUtldhbbGHcNf7tyuCl5r0MzgZ4s2RzMQpnqljZdGxCVFWIoVPavrXo\n/AI5ONgETDZIJuP6+e3VbvP0qrCE2qJwwKyVA6tI29PgpAbDmFokBNe3/+eQ\nqgLK\r\n=D61w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHI2JrhHJDzsZiHCH9+pcaMoTmsN+1mUzeeC9EKmQ9OFAiBVhGE1NFkntEnwUwjYWQgHu+GYg5PzaSG9Br1gpLqKzA=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.2_1550910003687_0.8956609634252242"},"_hasShrinkwrap":false},"0.8.0-alpha.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.3","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"df6a99567f7d6b7f8f85372e8538a1015885249b","_id":"messaging-api-telegram@0.8.0-alpha.3","dist":{"shasum":"af5d935a721d0d58f95a0ae1d488a236cee0b5f4","integrity":"sha512-F8pIORjHJ6G2ISFZCyRGZAOeb3rSaSmwDMlatBx127aDQid07xB5tiihrNlQBC/ay9mS338HK1gzovoYUE3NxA==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.3.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcf6j5CRA9TVsSAnZWagAAe8YP/Ak9nInGu3/X7CiKDk6M\nLw9X/GVQZ2obHsZe0Yb5cPaTj3XNZQCqY8uF+c3R7AYacXB+WQE11YCfO+eW\nMG7o7r+jJRvew7C1ukykzhaJhze67Ab6iAcnlafnX1otJRyG4Ii3oeldcpJz\nRfM4q2f6oMAYJZZt8SchI/mI62DlFyQNU73LenWxJGwigXSZFnkhPdHsCsjJ\nh3fhnCoF4G1x4FY8Qqs499I7acPjeMXzIiW1l8zmochYnZBKqbY2Rcxf4vof\nufYThdYe86FnDoyOIHiAH3+puSW9UVIUh901r+HmQZGTGQu17nf6+Zfx7HvL\nk/tJCe4ZjLm975UwRv7TF2zqeIzx/k0pa1DtE0B8X5DX4ARdggIOO6l1jQ6y\nEKwwhZXX6AXweuzVdjGSa/XhAVCzSJv/N6fk3teIpfnJTwNy+eS1FKUaE2mD\nE0L97pBZ6FDqResciFVEpiEa7haDFO6Yr71tOVhx6v8PDtEMTaXRd4ar2RJT\nI+8WiL/xb/FgBtx0C/MKNXXLCKHln8x2I2S3+6ev+mhGFCJDs0qJD76Imv0i\nGmmBaxZk11KcsJBKkMV0E+KPD91wPHHYdk52FrmYaRi6uRflJ48/HVO8oSi1\nswp9+jsrVvq731BEh6to8uvQ6tLRfX8Qk2EaEWWxLevJ0gwTeATDKtb+I7c5\nH0AI\r\n=7+OS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwrh80fI65RTmwhpB2sSQelQ3z7XOJJgFFRPhzJVFBJQIgAZ9ugqRq6Tv8++krA6rJvkzNULH/OKOBk9AUj7hmW0g="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.3_1551870199805_0.7858563056065138"},"_hasShrinkwrap":false},"0.8.0-alpha.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.4","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"ffaa89b583a64f6478a1c97ae47366056d1bde29","_id":"messaging-api-telegram@0.8.0-alpha.4","dist":{"shasum":"4b0dd90417f64d1f8c25c4cb3b9190cbb228f93b","integrity":"sha512-Qn+QoSUmdKODFdlHGcx8RezNcW1JAfJovQNJvHdrbnTZjE7AANAwks5YezhT2S1wJ0HoXugmGhh0UV/SZyrnPw==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.4.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgJ68CRA9TVsSAnZWagAAGD4P/jiYryh16OMqPrjVA2WB\nmoeFn5SI4jPkbv83xT+M7y6se6MINMACYDEWbkuM8bL1RGq1YvYgErlZoQA8\nRGE8CwUU6Z+z0fSOS/akMghjwX8KTjZ0gg7u+knyx9A+x3mGjYnqxnIgDFuo\nCydIt16NTeUWoloxPMDE74Fmcuz/fkwfjQqlrVZUmuVGdKvsgvfbBP3XRJGp\npgVK9glPycMlh5In6fsYHEeKJdv/Zy0nbiybpDiuNewNaK/BG0DzQ3vAccQ3\nX8l4Cm6Wh0mn96+g8P2EqdbRW9wtfj4IVh1CIzvuAbvz/hSskeMe9nrJ4py7\n/jhxZVRR+N0gn1sAnmtKxFrdG7EHr0b01CuleMRde/qQmoUj/k4HedaB9ZMU\nOQoF8vSkYq+KMC/gT567SVsQmflxIvdPTnpYlYpBoEyDlSyo7pTO1RmO2XnP\nIc7lBLZQmxYbVCmRywfMtFCb5wUwJKWioeRHcbDS/cZbYDh5qbd4OjMwZP4D\nFfLZw73v10zsAUo3uWMc1zpOg7uYMtAWg16lpM5ClcGpnXh/0iB4piaqJhp4\nFFtgDizUEmmhcCVFC+SZ2HPV7L8qow6FEWk+XyAeSJQC1RhKWhAouGFfr3zT\n8XdjNqghbs+lxXKF2oWaVnw7B5MSU/zWzpKR4m201Up+dLX+filodyeZ6uWe\nZ1s/\r\n=JrBA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiToUE4cH2Eapmjsva09pE2juEfRYxz2/a9caqjlhsUAIgb40QKEB58rH6S2mWuhGSqMO4CRpF3lOIx1TD002CyJE="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.4_1551933115040_0.6923837924576646"},"_hasShrinkwrap":false},"0.8.0-alpha.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.5","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"a05c4572475a587733b046c67b970103dac64b8c","_id":"messaging-api-telegram@0.8.0-alpha.5","dist":{"shasum":"6d735f93612081a958a1890b7013ea63764d152e","integrity":"sha512-MzTbLlmeze+aCYsqy+In3feh76xdPcq2XqpUYlPZMdQIMkhuR5XkpwXB0JgIvxKJoZKHdKxqoN7N2eYziJsPPQ==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.5.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgPoPCRA9TVsSAnZWagAAYAcP/1ZEoFya+pw2N+hYw4P1\nGFxfivlU7ndBiJMmCaUZb+8LE4cJEXbl8MDFXfgepFC/InWgtM42aq0m8EiU\nWfGREMk/lD3D7UGag6KXIC+tBbzb9DAajTc0J8XbmaLOYLLwhL3qEi6NPFZe\nNYg44TUrwz3WNGdNOQda+X/AJSRJfHnn+6nj+7Xk1qaB3JEhAkoJkYi3okWz\nx6H4fQN1KMfkCd4fAd6mZTkKM9e+jSL0bHNaeD7peCQCDc92YWYAmxEbX/Wi\nQgsLz3cMIsZBdCZYIS+/z2Y8/Sx9QM5ZfRE/AkbHIYrtgvAxZ55Ca5vNZ4d8\n3ZrI4jPQtgRjV7g+cwc+SEEKtOr5YbUobekXQc8wFjaPAtBPBQIOwdSN1aSa\nCyyTj9NsTxnoYVxsN/cJKCD3zVGTwE/JiMvfaWwjYJRoq/yJICPXJ49aswrD\nm6iqDE/t/CAVAgSnmQhGce5PRm4AcKeRvb3xS28+svq4jEPq3+ijBRvvwLy8\nWznKmKMAeaVTQHLzfUdQJoSL4WGnkVLZTBpkGxqIjdgZ7BlP4CYqA8mRuWEi\nX6jTMseAUcSAzROsWjanmTxzNB29BxPAUqx+G1S3s2vvIeZugCHgn5Bqttx1\nRyc8fkhqv/hp+ZpRFFpsEH5exQBp8M8lMQq8dyzoPpGYq3LSjX7B87OgLIKd\nJFvr\r\n=cLPi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY/JzjGr5cTWVudnRpKsOJ8TURlCLfzdI471/+15AttwIgHBqStlZ7U64zwwLZ7i5Ohn0lueJbK6SyhcQqpERoT60="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.5_1551956494821_0.5630226937587608"},"_hasShrinkwrap":false},"0.8.0-alpha.6":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0-alpha.6","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.18.0","axios-error":"^0.7.11","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"4cb66f703f9e2f5bf979d77a97342e95301fb7c0","_id":"messaging-api-telegram@0.8.0-alpha.6","dist":{"shasum":"bf1819638f4063172c62f11c073efa480aa390b3","integrity":"sha512-EbyWrLVbK1zev8yaMNDeGOUZBgdyxM0aPHAjaxPctoBiqL9igSFLbfC/hpY2b0slXR7u6bQjTHrK89yza/+r2Q==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0-alpha.6.tgz","fileCount":17,"unpackedSize":140553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcge32CRA9TVsSAnZWagAAVSIP/j11cBtBnCd88Wk5G9iT\n7kG9TNe4v4VD2zL7EvEizEr3ip4QIwHllG90KGKgGGpRhO51F1Mmg1IOBbfc\nyTcr14b6NtW4ZwUs5xlzEvJV93vrcfkbyf8qiGrnNezySbAft1UV2W8Wzobh\nzsmW5h7xLyXgCICTYmhQW3Hq5QQWspoyGOTjOfBdPWDvumASI88XGQVbBAEm\nrIinNYGPJCi6QXbL64qeYAItSCNbAho4X3+2TVWPaEMfjQZ9mpD9bG3qe1nq\nFgRTJo0ov1URXuhwIzB4Wa9YSiiI50Z/HMgn6IYffsM/9q8nstceaBWEAqrj\n+Z6moewxLQE2g5fpgC8rfarJycjEfp9WBsfn3ovzekZTqRqARz9BsPhA3njx\nd1eICtcvvv2hejcEwD4lZL8p71cnpsjvMWpTijDoI5xq8stcCPxqb4+TCqkL\nOWFxKG423qsMVYI28XAQk2w4Ke7rG6i+yUO278u/SAP6sdRrUXv3Vgua1S1d\nc/ZIbyzJoXiXfE97Dp+6x/FaUp8OwX90bZylFfBXue+DHCI5DoNuA2LqxxZn\nvQAtWuC9gWBfAHtgB1XkmAzihXqAEdosT+0ofIqpNwBbjRDm/AUTJb8DMYON\n5S/Czmpm7zWLabmGJEk+qmlWAH5Yi4W7aKqiz22olNWWOw0eFxMMPcupnoTo\nE3JB\r\n=Z1qo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAeByytLlWXVogLEmXfMSpEXTgc7kmxMw27CdKTiz81qAiEA9LHsQcT/MFFMDWZOQLIKis86XWwDLZCUVSagEfiNYXQ="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0-alpha.6_1552018932750_0.614534194922604"},"_hasShrinkwrap":false},"0.8.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.8.0","engines":{"node":">=6"},"repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.19.0","axios-error":"^0.8.0","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"62a2ec0cb939605bf01a6054b9ccce9f9bb8e1d7","_id":"messaging-api-telegram@0.8.0","dist":{"shasum":"c73e574eb9edccafc0351b54897d23e01c9059aa","integrity":"sha512-Cnuvuq2oc6e4YJ6hXx24oflNYmDBjpP6oAFJeeGh7jqFyjEMHB+oHD+RoWI867Q97fd5/p6HBDGeKdy9tBnhNA==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.0.tgz","fileCount":17,"unpackedSize":140544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY68/CRA9TVsSAnZWagAA/K4P/iL87tfBm81tgVpDLBHn\ntYeDrZw5jxyfljtQnFruZWIyol4AIG/ZUunmIFS+7hbux2Od+hYdiRQ9hrwI\ny/B5DvMhMoNKoYetHY1c8o+vgFhZ0O+AfPm7E9se5S9N/evnbh2Sih86m320\nFBl7RYrN1omS6uRs+V3kNkcl6xl1GB3Zk6cIDBiQpKpILuo1tL+sw7qL/FVt\nJeWQTIhTrsby4KFo/lOuI/eubLI44nBknsnP3dO00MCKk6yD6dRbb6b4OBoV\nKkuc2i8VqYWNwHEvRNXugzDOQ80MPcDjjw2svMpx0XNRX13mIhtdF9ypa/JS\nsYHYC48OVLegjXaqr03JTuj0MXohk0KvNXr6PloOR4yHgGtdg9BFmQr6+Aj6\nTwIPrDf6RfYJWEBhG9dKwdNtYGu370eRJFBfohkKQrxakmKkuvhDOMs1EFnp\nBAHPFaTLslZcialrC/CiuWsDcNS2Jsg8xF4ZYRLQk6SkD3wrZttzDNRa2H3K\nDUjiA/AWsh0x6ygNo8L3ewRaRZg1p+Lg8JNrcpcbAX34xdyjItRoVzKc4Uo2\n5ytZ8beuMrbHVpp/QX0pAbah2wfpRN5OXwJKCdS/zElQZKdrJX272izN6Avz\n4g94vkqqaTbPHA1S8JyzWO9CEMpzN/0W+wMFt1V/H4IH+kxfMkCuPryUWsVU\nWxM4\r\n=yHd9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB45JOKaWCKfRl4HNos1O1LCOhWFu9va7XnU4LqqmzrmAiEApVb8iDXScX9J3ufgr1569xlja2dihhE4V6HgNxfrweQ="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.0_1566814014918_0.22823713108193844"},"_hasShrinkwrap":false},"0.8.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"0.8.1","main":"lib/index.js","dependencies":{"axios":"^0.19.0","axios-error":"^0.8.1","debug":"^4.1.1","lodash.omit":"^4.5.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"622f5664634c26e752e4e54bd32dbc773271390f","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.8.1","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.16.4/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-bBWyG7Q/XG9K9kEPNwuhHr7gyZddjHRySnHsep6XgWv54tV4+7ucdE205U/5w9coTKH0hzzfVmPudc73ppzWlA==","shasum":"5adbe43f1c043a63115a36ec39f788194359c6ef","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.1.tgz","fileCount":17,"unpackedSize":140882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZKydCRA9TVsSAnZWagAAHBsP/iiqpNgZiWdsCSs0Elk6\nGL+U+HfbK+FdXhQ3f22QV4SSWR5cQ4mRNCX0YIdWiQbJqL7B+8POI9IGL/RO\nU+jZEqiFa8kdwOy2kHeuNRDWkvHHKi1eV8HCYmDkdi4iVM4+sCBBo7j06JLR\nsL+lhC6RyLy929b4N9S2j6yahqnGRNQu1Wb71MssJEb17KPQOy6fclZIUpLs\na8WVL50oj/LZYTRHIYjvOTyo3NJriSnG+0EG3ueMGA9rIyCi0NSEORXOn5dA\nRBqNu8nxtBHYp4335UtCnWJNa73/24GDGDv5JeBwZ9h7UdP83V0Lsp0oU0Qt\nNSigt1V95eny+e8tMN+jQLJpePTk25RY0ShrcAJbE8OugiVKEnueXEDR7rTq\nrPOOVD8SbVzHFZX7im8O5iCXVuQykIjK1ikaG3B25C3gFGBj+WvdsjALFh1c\n/ujNfJlRDgcDApFdrPIjZl2vWYRnSSpL+JgGWwiy2uuaVZUR3cKZkb8fB3I2\n8v005CiFY9jNl0B+KXUAo/GC65j6IQ9A+Tu2V8kFwMWVBbDRGWzJRdxvlDzP\nNpAr4WtPivfdndXVQIwpxWpIvWitdJi9CRcEmzHGMahIySemrCofMKPgkkpl\n3zmBVTea/twjzLG7lLb83RdN6JYJqVSW1JUjF0m60QDeISQOyBWbMRR2PDj8\nqqyI\r\n=DSVR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICmU/3eI/0c2byVCRUdDxLTsKvGYp9A5hVg6OXBBSNlHAiBHETFlCy23X2x1/ORixIa+JJQMccje6qwLqTcLuQE0sw=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.1_1566878876402_0.2490748666003375"},"_hasShrinkwrap":false},"0.8.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"0.8.2","main":"lib/index.js","dependencies":{"axios":"^0.19.0","axios-error":"^0.8.1","debug":"^4.1.1","lodash.omit":"^4.5.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"c17141765b6417272bfb1a51b19c0b6ae2c7137b","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.8.2","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.16.4/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-8bqaVvdYjPE/UJdYwijFYWeWNbUb9swPCefM1VQDrsIAhTOLyts747NQZOqdtazHkBFUMKfyrp+mku/caK13tg==","shasum":"d115287f48686d91541dd8acc8fbbec0bbe12ce3","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.8.2.tgz","fileCount":17,"unpackedSize":140926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcLZACRA9TVsSAnZWagAASvEP/02TLFMzKpgCWMpio2jN\nJgGxvu4xHLoPpJBz/a5dGJfV0Ze1myJkmQuxX2RZRpwws2AEOvPa1smp7zBn\nxab9GRTCs4Yp38LcjwiRYgzwzDUMRet68AtSKk2tnx217zf8Q+G3J/c6NahN\nDKbTY+d8uiDG6MtA537xhekEMs0Al5kvF2tKQ6OB/RQHxmt1dJat4TBQ+VVy\nDc5ozzHyIF9AmUrN7UUXzruZFAiv4ZkLll60LyrP7uiSmA1WbHEkFkmiqp11\nG2Hp0tp9+3GpWwtLjRuy8mA+0ZLzPbBOYUjQCXm6aCN8HnAGtTLdubGJBFUW\nUFX6a2EPd1Ey4ZM1K0wOdPmZILALZxGaq2+H/OhNryswCctzqGOM6AxqMRwR\nPzm3I7KsnYA759AqgUau0ndM3VjCGvepnjFilt546xhdXKrz8MO/aNJoTh/y\nkC2LT01L0GqY6RZkYx5YLvH7Ltu3xHlXPe1zpXKjaJ1Ei+tIBp/x2bQw8uDu\nX7YQVmXWo4lTEE98onGiPhA/c30bINaywRLMxba/txlevv75gch+oXQh0MLQ\nAhefr++5P37+gvxgvWMqAz/EiP5UGTj6olLNjYVBQWc2v6LzmGY77IrmJ8X/\nXsH7AwZWngngcXL9rV5q69nY7LZPElHt7oEAwlTP2QYYGg3Xi/f9/TTeJviW\n6UuB\r\n=76D/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp58o+aMAVi1MLQSNo2tcNbPapke+a7bgC4DM3Bc5E/wIgaJKOqaZrlWLxaux5obZzSMTeJ3p16kaHvoaO31j9tzs="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.8.2_1567667775737_0.036304942205933166"},"_hasShrinkwrap":false},"1.0.0-alpha.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-alpha.0","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-alpha.0","debug":"^4.1.1","lodash.omit":"^4.5.0","messaging-api-common":"^1.0.0-alpha.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"67490b1b2e7e842f4d1670d944d58a2bf11eb1e4","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-alpha.0","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.16.4/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-IjC/VszaPWNccKTpXnAmG2MlcNPd/sQw9zBCMwUmSEljDMddoi/o5uK3yeIhX2EdqOGx8wRBkP0Jdrh9B9SaCQ==","shasum":"eccdd2ada5c57d09e9d7b778c7b602248028e414","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-alpha.0.tgz","fileCount":28,"unpackedSize":319054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeMIzCRA9TVsSAnZWagAA2bEP/1n8YdZ1pGWyI6JBfJnL\nJmLlnh60b3HRtW++9ibqdwaipzdHS1oNX4ehMynz6uoqDlSFB3NIaIAbF1Dz\nWWRudEkhYkAlsnFKUK1GbagofN+q05kYFftUCx4A02mkrPVBFSZEa5yGSyZh\nVFnb1VeMZDNQ7ETdBogib5OrUQlTOaYBTWCHvE3Qe1gxosztV9MoVv4bjJK6\njcCBScybmSXcxHqQQ2wBZTeJKVgoRParxAub/9jf20qsEIuy5cFozQ6m2sPQ\nKTpNuAYkJ1V4Ds8HLHKaCOhfcQKKKsQ+SCA1IGCFcuF104spvwrCg4ljb15/\n49FFNoCaSQv4lnzi3JYcGvCbiIkQDAFLHbs6ZiyoaXzCG4Ko4GUBZ5p7d7t5\nWZXtH1ZdmNMmHzqnpBUMS6FyfrS/ffIQjMQ4u5EALxRP1C62N2mz2hZoTSQe\npKPZOfo80/54PQTg8Akz5mc733cG/X3661IpwxoiB9Yib7AB5M2O/andLpCd\nNjczll5KY4c22Nm4s+vogCjIwV6HJKUsh0ZmDtMeWAIMP/x92okUqRpgb1w0\nhYeNEnWZ0cbtyHY2cf9xM8jj1w4LI2ALUAleBD1b9HEjKTjd7if7EwujJo6n\n4VUzreNG0LK66j7lkFws/RUszCIa0/pkhyspRxNM34wckD0jgXsmr6P9zL0/\nCHC6\r\n=dhAW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbj/sPOtTV25henb6ofjbp3Td1qO/vrh6h5T6NWJw+QAiBWlbgVmujeHdiHH6FLmkOTDxPBnWWfdWEFUHm7Ik+xNg=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-alpha.0_1568195122375_0.17436990134708963"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-alpha.2","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-alpha.2","camelcase-keys":"^6.0.1","debug":"^4.1.1","lodash.omit":"^4.5.0","messaging-api-common":"^1.0.0-alpha.2","snakecase-keys":"^3.1.0","to-snake-case":"^1.0.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"7581219e17a1b1d9ab2f600e14f75b9714dd6fa0","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-alpha.2","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.16.4/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-Cp2UnkkJunN50BK9ErhgoUI9MsWLZRGHfHllW6a220OziTwo65mSwwrMi/qmhHbAAVXYiBzFk8KRpXycC0um0w==","shasum":"cb3787269ba186120d412a53499c70797ce3c34a","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-alpha.2.tgz","fileCount":28,"unpackedSize":563857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlugvCRA9TVsSAnZWagAA8TUQAIFYDtQLn0N25sKXW0Cx\nx4G+wiRR31TbRN6R/d5KkY7oE5HM5NVE8Uez+MK6pXEq/WGr4cFHYW3dK6US\nZZZnLgXOAvkn38nwVcRFNdVcttsBJe4sgnvqzkTN5iXXYx+bl6dLbwmZ6GfC\nN4yHVrKqNU1hh3Zko3PYWfhfva+zyGFxOIy9wN8d/gm+2K3JqhEyFTh+w9m5\nr8KjuZvgnWhU19awLCKYhxbwXdPOmM+8MrW9Vy6c1w2sCypH8thBPxI0W4Fc\nSsTVJAxhEvshdzJevYAnZA5+PiPSFvZKhBSYv6z/dp4udQ3YoYSav6Flhr8d\ny39PtmffXg6m+/r7JH/UFO0QH3RF27Wf0l4Wrg/UEVniIe8oj/XkRPxfjd/I\nBv+b2jzTiQH2NPGNveAQ15tN5kR1fcu88iiPgP8SV9TvFJm/UYxGJdiALVkR\nivsWzcxF13A3vhA/anDM0SNBaZzUjCkJLT/TbdPOk4Ps4lR9DDBoSnwDbjOo\noEX6h1w6er4LXCbUUgLjQvg7SpH3GavZGOuwtjsRaUUTWF9INRWCylJRp/R6\nUFN/TbIz1Ns4qVA9TUi8WKya/qH2PL3ISUUlk1zgnn9+xJj3R9p1QLsQ6IMO\na7fTrYUUL54XKtjji8BNRq0RlszlKKLifCzcCaAfGRClPQJRpN0b2LGS+Gp4\nkP5W\r\n=MVNU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvq0EZwS5uIhR6KeQvm4SOgSP18ADmHP01qvpWmGVBdQIgQYzeIY3VpqyxU0awQldTTuH/wHSqWWAbQVFPpFVocu8="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-alpha.2_1570170926961_0.4841260761702979"},"_hasShrinkwrap":false},"1.0.0-alpha.3":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-alpha.3","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-alpha.2","camelcase-keys":"^6.0.1","debug":"^4.1.1","lodash.omit":"^4.5.0","messaging-api-common":"^1.0.0-alpha.2","snakecase-keys":"^3.1.0","to-snake-case":"^1.0.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"f9803ae47e3964f3435c9e94f9edde58b750e7ae","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-alpha.3","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.16.4/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-N0V1xC/dMHuvlXYB0TEOiBgCnYsvVUeZ1Qfw8Hy2T5nTXnKZeTnaz5dJdobOGDeCVgzJIJbeOHm6RgBHXj57og==","shasum":"8fe2fc681899d045489483ac54542a631cbf820d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-alpha.3.tgz","fileCount":29,"unpackedSize":620335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnEZ0CRA9TVsSAnZWagAAWJsP/R8ZvSrKNNjzE/D0qzRR\nB6LXvyGdaYqFWH+vd+E17wcARt2SfSgTZ8d4dJwjMe6YDrt1NF9e39KWdI13\nXnWMBWkCZgb3n+U9uip14nZLQMyO10cbHicUcbd2bcjxmJCMtoPVq80MQR7V\nAi4O0KX05dj7zEBYCIaOLX1b0y8CnTajGJwI9ONVt+GSs97QOuk14Bg7QU7C\nCTqsWaUAalKO3aanMeJxSE/A5mteJBbCwu+R2elHU8gM6bpXTwjCA3C1FeGP\nPcRA1nmdZWfQZ3J3ix5i59CuRcKcDW7df88XE2xnLW4XNu37zFTMDb3iQ01v\nPC34SMFNcITZ1gJ5uT6ThDC+FLxZSgpN8wF6RTrvPpH3mCoewwXJqnzIbqUq\n6EkjEjN7nju8DdPqq2PdJCU+FGQei8LLyxxf2C2xVh963sVdc4R8VRlj5QV7\nL5CNNu18DQKDnBWO0WG+tV/vwPqTN9JSz4PsTIWSKtT6yqspZKvuyRZacmPY\nMIobQJ5rAg6h9sZs/DP/UVuZ/OW46pehbRCove8mmOlg4BM3CSLAUiBGfZTm\ndgf+9kDLraDyXgDviShdEE5L9MspvWVoBO+2Ro4Ji1wlDf6n4VQM3zrkAY5Z\n7TV/Z3pu+MGBiE/nZn276gP54mhQsU+rUONVDVtvtF+k94c7BV1j/5Vz7DxX\nnhvY\r\n=wZvF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMIstrFRWmsk/TtodG3+LmllIiJUNSwvKtT+8v0z8dNAIges7JrchodfByAF6yKI6vh5XyflNp6/CD327qD7yLKXo="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-alpha.3_1570522740142_0.3092283043884356"},"_hasShrinkwrap":false},"1.0.0-alpha.6":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-alpha.6","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-alpha.2","camelcase-keys":"^6.0.1","debug":"^4.1.1","lodash.omit":"^4.5.0","messaging-api-common":"^1.0.0-alpha.2","snakecase-keys":"^3.1.0","to-snake-case":"^1.0.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"7e2f8be9698b03e5b16a58e6b6ff5c094d514e62","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-alpha.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-YTbQ7hJXTrGj5WU2v0sudD+FV3Beez6YI1xSCdgAqJwx3KusY7xsV3e//OXPfMVKNW52xK0hlmNHUI7TSwONrQ==","shasum":"6b26fa668f3b6f4e6faab4c1d07e359ea66299fb","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-alpha.6.tgz","fileCount":29,"unpackedSize":620367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUj+CRA9TVsSAnZWagAAUgkP/0u47RVo8hVh2S7tCOP/\nkj/XI5bGhIoyPUTUOUJyVUrV2nrMk6rQ14FmEywfiQpJBq8B4iVnRtcoZiHV\n7UmyK9LIwcVYX0FC+xikoCmG792pxzkUH0mcpy8l9wUr2E+q0aLbZDTQjUDz\nBdzThwQNpt4v/3uYTl6dT+qS1/rr0zgQwMEthp4pobe5lrfxx9lPSddvrCq7\npuUPedadg8APaatFlImcqMvspeORCroPxIJb887jGS1SQY3rN1BV+Ett1RVw\nnYvBz/++rXcpmMajLMCF6/OMIeVmeBNxRMqVsqtptKeu+YaM1U+5tg4LEEfu\nEFs0xEt0KDou5rOElxYLnHfEcu7oSztFSf0kzNpwzq4cQ10VsCR7EeTEdK8i\n0TTpIkOBCoFrdK1rSvfpPC1HI8yMFNgUKeCQLZDBkYtR1EVimmyPuH9QtTTE\n9E9jbBthqFYMmq3xkALHQp+GgmX3J3SMi16I4aUDZW6XWTaXdIgsEVCUhl5k\nghOSU60pO0i1gATQTF8KIayMoLgRHkN3NrXal7rS3z08E8TCL4x6PHDioNq2\nWT/ZNZdn9ncpGEvym8/4WfwO+wTZBmO/nBP86NWEIgyRw17BDV0AlPE7qPzp\nIF4j1Z7+m2+i88LaqXZGasYDErsFowRkuGxGtrWGlbJKvzwbHJ55zA2x51dt\nGYa/\r\n=GGyL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWey5WeKmvmsAfTKVRrUr7Sebj8jdlvyqq78Mi5ivhXAiEAxZ6tTfqnPK+AkmMwCxlO167P0aMuEWLPvqAO+DfjCOE="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-alpha.6_1573472510257_0.10127713314946396"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.0","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-alpha.2","camelcase-keys":"^6.0.1","debug":"^4.1.1","lodash.omit":"^4.5.0","messaging-api-common":"^1.0.0-beta.0","snakecase-keys":"^3.1.0","to-snake-case":"^1.0.0","url-join":"^4.0.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"96eaeb0fc0b1bf8799d17dd93aa4c59f1eeeb0f3","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-gTfqhEYTQneAjumUK19gELPNoCB117iFQUoP3yBNVAHlI7rCFiFe3i67XZitC5nxmXoKQPKetrhU3VOBnkjs5g==","shasum":"7aa2f69a1d27f91f4a0e6a80d886831decc47863","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.0.tgz","fileCount":29,"unpackedSize":620365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP/5CRA9TVsSAnZWagAA6CoP/07jLsdaNpDJ2o/0a40x\n+x95PGpQVInnKKFUA2SqgqlSOlCDSXSCJ6EFsZHrg3vHxe4ZJXAE6DRBqYd9\nnfYRP36L5JwNXtt5jyHW75ZeTpx0Of4HHWcvqH3v6sJ8DISAJPvzF4DYdmUB\nbJkEdtCcpM3uZUcgxFzyu7T1cQJEKPGJ2RThN4n9mjc6xPK7Db1XPakjp0UF\nISZfSJlIggnmXZrRpMmWSc2TmYHX8cYZN0b3yf+GxYpGufyXeSNBN2mtmdSo\n3fbCskuxNEmnG0VxmVO5Rl07QPC++LwJ+oQ/31QvmNE0ZKAopmpIh0OnvQUe\nxcaIz2q1gTFq/V3ivUy4sN2eXJpdaVUDwe0dCfpJCUg3vT7XMJJqx4+8x1WK\nv2FwuUalpcCunWtgMyIQOui0GP3207DcLPOaXC6tdbwMtG8PGSySLaxGd5a0\nV7tNls0Uvm/xkVxlXw/l2OkH3NIAebDoBGRUctWIqnp4O+64u0QJsVyBAY3w\n6NrcEpzQrvdbeYIYT8lNp4iy6SvEORCZ9DV2qUx5olpQfK3cuyWzMHEdWVYO\nbYkteI/ceV7CfZGSY9HTTDmgp13r0iVLQ2Or3V4rglQTfj9gA7Mz5fi7Ce3g\nwg+QKYX15rb83EqF7QkNWJZnUON6vP0fpYMwIHc9kmqBRsCyGa6SI5HmOj6U\nZ3tK\r\n=dlv1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPZvF2CAiLT+BgikYID7CVuqMbzA8hqgG2uWCtumGiLgIhAPHRRajb8BKwjqH5G49EoIANj+vsyIJzhvqmsik2eFJ6"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.0_1573715961018_0.2595700834907595"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.1","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-beta.1","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.1"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"c92c8cdb79d62893a7c07f5208a5234f7bfc00cb","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-im2m4V8rfcXCt/K65Lll8Nk7SN0laR17VoaGI+LvIHEdrIysXKUeUfmTH5bEITY++CEfyQu3/c2BhF4Sq+aM2w==","shasum":"78dd67eade892d6862cdfafc1d93e9b155f5278b","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.1.tgz","fileCount":29,"unpackedSize":615557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0BYQCRA9TVsSAnZWagAAK5oQAJtw1que14m4tdDvSj/l\nzDfI370iHhGGD2e61DPrkjyGCln33r1QuNEwxVarbJlLP+oNIPF3jWCIIFBo\nkQ766UskxaPTnFnlXo4kPGsXLtbwqcZSpSEQhpOoHT1htOntO747mO3sPDpa\nP8HcUWJjMCESLj9ixkqQUE9tT1PzTKrgXaLWr3tLvS2nWmH7Z5fPHQEi1KYI\nSz6oyhxrYRBHujoSEUi7XWy1349pj1moq27U5z2rrxpDzoeIUR9wzr6/jcuB\nT45ubJg+KNFAa4aTNibe2V3dYq5Rp1IavzFD9KfDO4DJteG81EGWlvcdMngk\n0Tr4X9Du36X0+owT/ykS+/wygBpOPaAYVq17r9jmiVNx2uF19I04C8x/6hGD\n4H2laCCtCYEyJkLBIdcN6E8Vx2218is9PHAIaOLIW6midFzgd+XhgTNNUd3Y\ncFmP7PdnNZmMd4wdXmIZd3zvewWd1UMWUAUidNUpwKK21gvBa4p5FTjj3RLK\n9ieRRNyUAUADEz00/yiP7vXVH5ml8X2cEPX7DSNl7cmkaBs3/8TL4ZSMAFRR\neu3zgzaa/ejqDxD6a9Bao6cXSx+uwJHDnBwK8CLJvigPMAzNoFBLg0LUj9AB\nCmH1eHBcWz4hfdXNYkQAlkVGoziy/DQiYYVeGCVZVXG7phulQnmjhowsZlTJ\newAu\r\n=xpUk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCWebAnJWmamW5G3tKsc3OrYBMjUcbmh7DdS5mVraSPAiEAhsrleL8HNhnr6KUKCHVFtOsfadxxYGXQQEXT024QYMk="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.1_1573918223839_0.6606439221554958"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.2","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-beta.2","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.2"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"142b0193efd5babac07cf7280545f7ea202deaea","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-VTed3Gj/qvDHFBOo9S05B4G2dyB1LAQOZ0AsRRMf42Rk2a2GqLlVqTMJ0B0VZqT1eIbVLorznPpsvHgO1yPUWg==","shasum":"374ca348605ad90745099ecf4ac564ae77dc26d5","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.2.tgz","fileCount":29,"unpackedSize":615557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd04OxCRA9TVsSAnZWagAAaUIP/ioWCPM5q2VouUFcRTDW\nQNSg6FIT3UzetqBOfqIVZLeWDZC+gV0wedvHeBOBMdOtt+x29sYoU2fY8qO/\nRdmizjUi5Q6lGKMwzWgzpLWVU/WSitVaF66FifzvVPr+yGZ/jeHY9kXJKie3\n0c83cYYgG+bNnqTzcU4RtbwxAh2umbfZ12E8ZJAhDgUV9nu2pEz/NbqmBxqc\nwqlx56QxQ/kgt04JkHlRTpMOXbs8esUq9J7cps3ds0FnJiSXt0mUnkeP+cs0\nbgdiC6UBVYI0sQA8+CsgqkQH1NoQefVdbZqkqlc8tcdaKKkj36HHINXK/V+p\nCh/HCqOvf19Yx4QZGnvM2gFEDLJjQZviEODwM3l709G2BE/evaQFmsY+6YOD\nQmFnU4Pm325sGLyp7ewACmD4aI7NMcbXQ5AvVnyWR5HkJuerk5qC1N7o/bKc\nGvdrDJvWBSNTY2noBWYCOFgzb1FogxyccS7Mi+WBJM/JAyLZn5nvqTdG4t/P\nLpfXxbINq3Kc7F1g6geUf32GQShAbvx2RM0tm61R3IhENT4+EstWf653P0NF\nJ9qOPvvG5B0toLnx046mudrdDBPQFK/nfO5kWU0Vai6F0tMmV5Ptvm3Ox08h\nbx/QHOWBjnCquz8p8K9h0O6gYNJLhONHdxAy1wm3ymtzyX8Sr5nvZU8QjOPL\nFnz+\r\n=ExR4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmT2FRVn2cnrBB2k4fk9GXJhrKDJIDX6Umb+z56u8q1AiEAiQxcek0t7PeoUv291sivaBPDCWzgsdCnXdzdw7pv0OU="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.2_1574142896778_0.6199953715090338"},"_hasShrinkwrap":false},"1.0.0-beta.5":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.5","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-beta.5","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.5"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"701efe776414a93d93d709198a72fc80991f51fc","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-uv8r6shtwEU8tJEgg9THOlj9auVwEOk+aWvZtsQt1v8/OKD6xDEwW6vV9Cq92lAfVhWlirqGaYiepfZ59ENgfQ==","shasum":"8ab8a213c9f34cf9cb19e9fafbb199d9e66a17f7","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.5.tgz","fileCount":29,"unpackedSize":615557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1+qgCRA9TVsSAnZWagAAt7MP/0DhKJJ+RH8o5OdIGkz2\nou9qikRW8aOJ8yGpszLo2C/8PBY90/BWVD8KC8RClowJxOsiUztTNVpKJhIi\npsEu6P6Yj3NnoTRXb/ffZYZlkvNgoExv1x6ytja4koNuY6APc3C9eae3olxC\nlgm9oQW20jyf71CYdfrbhwkxWrbUTyH0Pm08gaNECdwq6ELrPy7FYMUNuaKy\nkBDRhj7YV5B1n55e7czBxXmAp6tdpn1glDJ7B7uP2zE5zbqckr+YFC9VHAIZ\nAJ4PP9WPUPF4TfyV6SegQDwhom5eM5OoX4k0LusAAE8eIO318l1F71hT8J9S\nziIwwRrk7w8NPoYt2N88pJP8Tv3cpStfX48ykEhzmePW+ftWyGaJKfzg5ez3\ni+FqmcuRpt5+fiWQLKB6gc479ByvodDPwXQrPPgIQM820d9XL9x/sir0cAfP\nUyNkxFIYXb07YHQj3N7hoozWqd3v90vQ+DdQLyxWVx7uVPlFDQbyKsbWaIzA\nsz8CYoR+GK/OuwZtLUM+93jMjXx0WnuZPmTMJ9+28g2Su1XCCxAKWtUgmFXD\nBfgr2VZsuAK0WJ7qiD3YWGHx3FBpjDqBPyuoblbbKTvvE6eKwW2koQOJuW90\ntRot3QBeMWgNcROXjJQkKuRUSsVCkI0ROyHDlDV1YTOi1VPaIRyFZVlOY6ZL\n1YO6\r\n=Jewr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0oGeQnzuAqq1iRdPUKNdWnH6P9D34aAUKYxMtHDYkSAiA0XxjHJ5MZv+cu7BFFyZF0Zh/vK6sk0u+zLFZ4yWr9HA=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.5_1574431392004_0.8268297594314502"},"_hasShrinkwrap":false},"1.0.0-beta.10":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.10","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.0","axios-error":"^1.0.0-beta.5","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.5"},"devDependencies":{"axios-mock-adapter":"^1.17.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"9ce7ddd82779b579beab4256d71ccd4599e6c58f","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.10","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-Uu5I1JA7+vUfPf2c4Ek4ZV+LXbynyQ8uxxWsDvBqw+D2xfxAVfsWtPt99UrxV8sGvKQoTzTPMgdTV8V5TfES5g==","shasum":"fc00874737867133bd2b093cffb55e11bd6ce5eb","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.10.tgz","fileCount":29,"unpackedSize":616096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cmcCRA9TVsSAnZWagAAdGMP/2l4JjZSPd0q7VvcraXD\nE94+CsvW1VJVd4tSje1nJxvgfafNBdzGtJPuZdEQVEUz6ciKIn1SZUB2c1G1\nlOauxtWueqoF394CYqLezMypR61K3OZho56QMGsPEpf+acdk05xnvbg/hg9h\nX9ntKrQX2mrNHhXtxwhVSyGsPHfNITKIf14X5jST97+EaQzVKEHviydEoAGz\n+QbBPPPx+ko2uaRwTDZEAovhm7fjcXWbC7cthF6i8HWa1hzsImBLHtREn6Fg\n073xzkYLIKc+EzS3SeSNwdpKIMmtWpvqBPxHgBGqR68rRfqZzp2s5Ju6tLtk\n7EH+zY3Ijq4sh0XLPXm/NG6KPayRe5FyKXsFsxxH8Jd1GS885ltilwJBDli7\nawVAzcw5P/SScjyb/qhHmaZmmJ9L1jHNv8Ck0ATchcywtHkLRXHSfv2uGxvU\nQ5j4L8PMEDkOewk+ZIiSeiyfFwocmYaQ/1R7zYlntNAdxBbtwlTlLIHHCe0I\n7FpRFgmkT/Nm8+5jtrOVcoGZUG1fLkeqz0U3+GCmK0nXw9iauWCHHFszU8vE\nPMnMlQq9wsqQcwMSnj+A+EHddVFIA0V7rOVHrwRU//OXmpJ7X9MNfpzXMFqr\n2J4QQBGLladkeXOscTQzLJcuchV7xVtlq6quykdub+kJtqVSko/2g+nN3vUg\nFiYH\r\n=NUO/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRchsCsfjj4J/9qtycLzUAioLDh4y3qIbPw4WH9V9PjgIhAJRDHUjroXdKtmj0mVQ0XGbkgquWiYnaaOxspcF4Z0mN"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.10_1575864732256_0.5075420418440404"},"_hasShrinkwrap":false},"1.0.0-beta.16":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.16","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.16","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.16"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"e0695dde8d2b01d1a068f4086fbd7988bcf9de4c","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.16","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-R9lWthXQrJw6ySEDyM5oOoBHCwERrOc1YriUAwCq1XD7yqBQae6lMPucJqa0jj2Rzcua4ZrOOQrKqvHJKV7Pog==","shasum":"9091df3838a35ea0d735dc48814eacc490e77439","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.16.tgz","fileCount":29,"unpackedSize":616034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiz1wCRA9TVsSAnZWagAAv1EP+QGtFtlRF3rv0hRfevzf\nGYj4WUkOL0n0ersFQcv6GNS2hHw6PiEgmul0RGwo/zR7YJAVvUWe9cWqT+Dz\nzxehIctjLw7+F6iY2oRdHyE2uVRZ1Hy6ZWKVTaj5dzHq6lYMJhcTk8jA5CQn\nAPD8104zM/2fJKmTbAM2USCz4YMn4GK2EG0hH6o24ecUoPwU8zFhvbUO12LJ\nkrUTeOhmxwQjjBTAJcnUoZ1VKHssVK2HihspMJMCAlH0vKvEWDfsPjiz9/5c\ngUFRjBjQ5jfpLj/hG2djFA7VBjms+446NbKASq0KmOZqTl8bDKF8yvXuziwF\nWcp1ytwWmAGMvq8SH59MGdFmwiWIzRBdfW5gjCzzQ7904SKEbgDJLPtCOBIg\nCOBo9lOBPPfFEdsgP24eHscVFpZJTMtQwth6lNgFBigIh2Iau2DM3Kjt2t7B\nIRspYSaAoetCetn/axql6SYgnQ7mgNTRLPEs276QXU11Yi0THEMhuGKOCY2N\nUTzx//v7e28IyNZ45P+Qv9IKVWH+SbhSyQnpdJEnEfuKSQ7LVsN0lvqOFjBU\nl+gt7M3JlO8Fy2u+JNPNEab1VjkGs7XmJNOCOU0jlu+21Edz6OfqCxXmt4gQ\nOcZW6OQFQht9nMnkgfhgkfr19XgO6C6MipmADkNOf0XvmlIw2wakd2WNyynT\nDmPX\r\n=0PF3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFplTzE86pwrHJtY/Xoh6LsHotcdSiXuLpdO7iIdXj19AiEAwCRbaKitVHTurfSDv6lu+pmywXmDxHVVB4uEOJ5i6Pw="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.16_1586183535821_0.7041579297851206"},"_hasShrinkwrap":false},"0.7.17":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","version":"0.7.17","engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","main":"lib/index.js","keywords":["bot","chatbot","messaging-apis","telegram"],"dependencies":{"axios":"^0.19.0","axios-error":"^0.7.17","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"gitHead":"e5228dddac20dde2da47d053653b68013ceb3974","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@0.7.17","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-mxY1TSa4YnZFjPW/tADFHfzHUqsvEEwKyCQX1DvKch7MnSxAXq+VqMrbypePYlPXcqh+Cb/m0bfGEEZz1XlZug==","shasum":"a1f341d1b010bfab1ac52ebf04b0829c616c162c","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.17.tgz","fileCount":14,"unpackedSize":124776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejV27CRA9TVsSAnZWagAAgxEP/Atm/+9VPkJ7MwG1rWUX\nDKlqqW4ltGUUrryQhTB9Wcn44ZH1aU81NXW/eFDaH8LwbKYJSBW4BytqKJG2\n3TG2CZWUYcDpwlcuiDE4Ou/5L9Tzp0NqGP10g056suqGYJ8dbuA2vbKdAIMt\nt5haV5+26Wl4Y5UQ1RZSkIDssmnorlGJpWmtTaImd0lFPMB4qU60buO+r82a\nXQ5VTza2PFy1xr7uMEFhcbivoMR/Gs+TgEEDK+tXYhItk8a4KNSmQVIBO/SC\nvmLQEy7cCwRtEGUoZvMJVvaFgvnKTgL5zBqmHNHSqTzZSecoLZvr+9OWyJ+P\nsYkfsbJR0R3/DIaNMu16yyYImlgkiSgos+alrEjvcr3y1Eoey70OsfS9if4r\n/rhl15jX9xtJNx25jmypjpOjQYMeD5M3E4v9T9HIr4pewZd3+KAwbZPArdCG\n1Afw/gVteiU2GxPU5mGlXYSXOhWX+KLLp8gQ8gKiy3TrwmBQP9ioLs47tC+d\nS/bik/8MRFT2TFaKY38ORi9X2UMd4C+FKuQrxrVBO9bL2aXia+4Y1Hitj9ZB\ne05eBJMr3DzMKByhcm68tiaoixsyhyZnIq008eVu9FqKmT3W9rlG3q5umSgn\nqtlF6jsMfXlWzmBO76Z/x1Va8OfKkvodNGh9pErf1MmGaDLK3pAnTEC9XdQa\nQWWB\r\n=BKxS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCd/zQ5mPosD/E44KGZZ9EbxFBoXUglCV5wcD9s6FIAwIgfxJM7W1FYDqbLdujPronAT6/wZ1dFXpO3kCEXKIB6fk="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.17_1586322874975_0.13746159726178653"},"_hasShrinkwrap":false},"0.7.18":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"https://github.com/Yoctol/messaging-apis.git"},"version":"0.7.18","main":"lib/index.js","dependencies":{"axios":"^0.19.0","axios-error":"^0.7.18","debug":"^4.0.1","lodash.omit":"^4.5.0","url-join":"^4.0.0"},"devDependencies":{"axios-mock-adapter":"^1.15.0"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=6"},"gitHead":"4318450a056e285e70093a80fc0bf79910665642","_id":"messaging-api-telegram@0.7.18","dist":{"shasum":"6753c56cf1e7f9c7b98b4edc2157cf4b6eb9b640","integrity":"sha512-t/IuIWnDIEPOhbLTyiB2LhWX5KhtIfVZn4cHlh4FIkFWL/fPCZioReej089owNbG2ifQjrsKMfmrr9WbaaOk5Q==","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-0.7.18.tgz","fileCount":17,"unpackedSize":140546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejV9XCRA9TVsSAnZWagAAS2gP/jGlScWhPxtBMfPrRbA9\nIi6aykCDdkN4uENwTLFYXJI8Wyo12a9xnovZOrxIFPhFTRUq1SBxRxBF7qk2\n1i7OGIulC6kkcTmIDJhZZc0LS1yFWKMpd7Udq6RPxcuQo9Qxentk64zsSkcV\nudp3jreiwEcWiiwXXU4d4WkAOUgl/8hsRcZ0OK8DH3z0MFr2QLsza+0CtcKI\nbXFvJ3REo00jeRi3IFwZBkczeDFd6w/NLmZOZD/r8fbCFRtfnWuUfsCeWOZc\n3/LqLa1QZEHnBskBVSqQ4uXczRQZ6xeMH1I0ppC8eX54lMUdYtLjpl2cr149\nlYT7vAfgcN/IH9T0tM3PxXkOOlxW/F672N0gF1I35eeMXS5DaHKt1NighYOw\nzuVJqpH9cj22ChY3LM//EAgWV4W0dLZE/l90ZBV55WaXvOHbVhhJMjYRIidX\np4NPBcMyg9K6pI1N9TvkyqO20lpVeshen6b74glWVu71YVKStXaf7amGoTZQ\nyLtIMV1g5C3pl2LFQGASDfETV0Kt55upYnYUC3OmZZR2xcQ75iNH2TgO4BZY\n1PZHF60q5HkVzfMV3XNKERdLg2VuRdqBx1yYPNb9IXfYXzSnH1/nKTFPF0zz\nhqZBAPKUcklMWgMqHZSy0ktcBwKxa6U6CnFLO4+8UpLUmf6Roato7Jvs1rES\ncTRF\r\n=y9YN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/Ql5foPY5lt8gHI45qeCPnYJCTHtXY99+LoMiblwu/AiAPFCAevi8VOWdHyNqcbn0MttLOwM63WAimwwJxFUk96Q=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_0.7.18_1586323286886_0.17693102942246486"},"_hasShrinkwrap":false},"1.0.0-beta.21":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.21","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.16","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.16"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"54d1c55b4f4ffe82275d67a7b5362f943bd00274","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.21","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-D42vPpdLYLmfmbuAKfm252OKEGRXX/MvH1v/WNaQC5upFudrDnELErqLeGePUiO1561BoJ60KyL12SNQpVxIjA==","shasum":"2e2aa523e2c0e000741941da67f74f389fbc8163","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.21.tgz","fileCount":29,"unpackedSize":645578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep8yJCRA9TVsSAnZWagAAYvUP/3mI/xJh+ywA+eyFdpV6\n7lz975jpDZm9NhZ2LIgRzJLBrY2z9z8+729yGnUv2QtFG7v/15XjG61IPo9n\nz4Ku2+oq4NXwdx09d67PyhW77n39sFEX4bfKkTFFP/5Y33Uux2DsgEhxNYdG\nUusy0buOLw5ylAUMhaMEDHGp8s868UxWAVCHtP0TuLYPeH1i+tGjLS9XbvH7\nUFV76DwAx15tc3Gefk6NC3AEeeDHsbehSi+R9iYKx4mRL/F7B+4Jabza8TU4\n2a3ozanmxMFhKLqeWHSIHUu8nXIFlrX2vAdje2pfRaAKYh6EnzOSLI7VoDyT\nGfHBxNpQuLB8rKxZl7M7fw+IZdcX6U2Nf9cXRUBv3LsZBUWgubiixvU1pB3n\nuv1s11tye52N24z5UPQhU/FqIUHBF8Wm6DvFNcPgCKAqJnbIwtlV3bJmGRnU\naQI0++ql1RSsoL3rOtDI4C0fu5T5inkfelij69AQG0grMMV/9rU1j66dyBz4\nRzl3GNK4Pnym/etdOGMux1hgprrZBirQiqyzPDHSbvmEqr51YSqCnKvdp5ui\nJxpXtx0EXdLrtWM8XlhAG14yJJ8U71ummuUG3FxLXANGQuOXQtF/ca2stkiK\nB2/htGxEHg1S0REfIbvjoJ8D8vMVFLdDAIT1FRJFO4wbFSn0qBOCnnJRlnWY\ngwI2\r\n=FPy4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEbm0HfyrttjHKeG6U/YaWhtcYevv0FYfQsZ1KrQGKsoAiBEZkKSRzGA/yVb9vOnFZg5GaslOyfOvwAhBOgBYFw31Q=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.21_1588055177200_0.5669578339619219"},"_hasShrinkwrap":false},"1.0.0-beta.23":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.23","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.16","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.23"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=8"},"gitHead":"5de733d62d61798bdb1d4b19b363bbe216b324e8","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.23","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-DWp9kOIYIZQF99dmNYOM+Y1HxUpCcmkctQ16w6oi5s6fFHT9Yxj1k5h90NMS3Y+SlKAtoG51n1/MxRqXH4I8NA==","shasum":"f9c5b251ade4f2e748e98272a1d4c21d97f5afd3","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.23.tgz","fileCount":29,"unpackedSize":645578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewlXCCRA9TVsSAnZWagAAbTkQAJ+HE0kGjcuJXQFK2GTl\n6rkDsskF0UueDhflu7LxxygpK+1++Ro9qJFUK1/hcJum/27aS1wVIGDJqkOR\nBsVYa11XMnvKNUVcdEv2DdZ8IUXkPHctUWlBLUookZOxhUOghVpGksn93Eaf\nC2APk9bjl21H18BrGnpBHJ6ML6rMO54Mj+1bN/Cba0M3bSitFBh/5D3SVDkA\nuecm/qwSpYfHC5WfBltEffIrGH90FovEdydERB+07/L8Hf6D0cIYw0ll+IGI\nYTMMF1bco+jScu5SIi5bWqxn7O/5J5mNrEsgbz2/tjBmbRHT1YidIR9vfTVT\nADuRoKs5bOTZShc4uu+vWPXx3ZjVnX8gdJJZs39XAJ9Jr8/5aw50eHtmCKjD\nvsJnYpHk1gfdd4KooNPSn75gZjYxM/jxaGnGAr+Wo8P8nWy2Y9+W9T8o3D0Z\n6Kp4m7VrH8p66irffgqJtdm7T29f6xUHEsX92KVbBlDXUYqf1aq/8uds3uiW\n08m9fddKCKA12wnKUoSIx1F4XLFrPZ9uXr1XJzRbj9Uer+GrElyfxf+CROtp\neoHcpP8Y2wYAJj3fPm932K+jdgzxIlrsqoFZrp210NKeOO5fOuhI2aAFOzr8\nCGnlZUiIPTg3WgVBGxfqOXUWdTZgF5TD7rReDwuF3CChkxnAUCO5C22vvAN0\nsxt6\r\n=+RbV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgaP7RZf/HQ4C05nEuqx7OV0BT3kXVgvYaoqyzGoKR7AiEAsS3IE/eVXvzJYlvOiM9lCvAEGnhWD8pNjL682oiX0QI="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.23_1589794242370_0.9312825630433756"},"_hasShrinkwrap":false},"1.0.0-beta.24":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.24","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.24","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.24"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"18258941a920ed2aabf7b12f17e10e8c14238c15","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = TelegramClient.connect('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = TelegramClient.connect({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.24","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-2XxesgVYTZhkFsDzDGb/ufcdT+m/0Yv+EKxajTGmmk3XC3/tdmhu4Nz1NUvk/RyjjForNKeKfahJpl5SW1KBDg==","shasum":"cf534da38096c91be480e693788af6b66384ea8e","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.24.tgz","fileCount":29,"unpackedSize":646488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4dEPCRA9TVsSAnZWagAAk6QP/RMpLnD6Uc79Lp3hkh46\nBPI2F2VjGH0NDycvjiM+JExB8R+SW374DhIllSJoYpml0jzDOSk6moktB9ZW\nhGUogm8Ga9Lqe5ikOGtzgqKHfvT7lCvbPrcY0f/03p3lTtLmJr80OCPo4YrA\n4CI91qbNpjETG+zhkbmiFObgUaFVhKehx5feuRfrjRaEJt9HcyfUDAgo50oZ\ndR3n9Ns8Fo8NuM50ygzOrzq+Glk/WslbdwjAJjdzuEzQnhYZ0sqhzIrKNqPx\nVztYDLHPf2k9c6Yazqs+qt/E7GLgoJQTg9MGUZbQLW46gA5bUoiIWKlYHo56\nO5GtqnDyvTIJUn3ZsKuQarETbQg7MxofnHFzmtHYLt81gyemYb6SyMFtgiAe\n1BD7Lk+Q3rnbywABUoeYlAYpTZkM/CCpn1gQkSefbPRVJDQCrXhKG3Fg8Vg5\ntY4SqkQuuvAGHljaREZa8hz24SpfNCTyQJsZGYyYfyXnYINVZYkUGhOjY4xm\nfZsTjuoojg5L9rvsph2qjkGRaF+lhDjYv0LJvk+lNKAU72x4XMQzgjaRx27j\nTZaM1a6tUYDUMmLsQ8sQPlgsLQdjdWxZo7ygRTXOQBnOSmly3q1OSh3sIfrC\nu7uf6Mf6HhG1oC3pm6zBfuvAztVxe8+OCE8prx7BHXHBz+IQStsJhXHy768q\ntgCX\r\n=Xw4c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCppcKr5e85ex3uR+SCo2v9dqnGm9MZNHm+LAtXSv/MfgIhAOA/XOzaiBPT6DjvAk++VI7l86two331AGqG6eCTvM95"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.24_1591857423402_0.9589008318052326"},"_hasShrinkwrap":false},"1.0.0-beta.25":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.25","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.24","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.24","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"5cca124548cbd6d36cafbdfb3ce6856fd338dbe3","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch(error => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then(info => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then(updates => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then(result => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then(result => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(file => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then(link => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then(chat => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then(admins => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then(count => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then(member => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then(scores => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.25","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-mEexBdMq8ay9mmfcC2Yf1iLCk5SJLaEGe9iU71f1FuzQexUhN4Trv65eogBMj62c1Y/WnngW/fGJEUlxXR9UwQ==","shasum":"066aebc3724d9d37779b7d4cb15014e061e72462","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.25.tgz","fileCount":29,"unpackedSize":653047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4hXXCRA9TVsSAnZWagAA8hkP/3VwFh1uqrvicd6nkFeC\nwrHBCQJLHnp6shFouK5BKtwkun3Lg74CCKs0pLrGSpZMKViV67bNfzhIbQTo\nq6a5992+JFXtPQXth2a5yJ/JT7dl9qBCL9r4MZiBR39KFzx3FgPZG+DototV\nu5aw/D1fLW30Df30r42Ov7TDc/nKuDqEE6Pnly2qeN5IVjKsVibgVTITijgu\no/IHS9scy3H9FijhEfnIQd3pkrjfZBIgb9cK+VbQKu5xazN8Cta/L3dSAkJb\nqjzjl+1zMjey8Y8DxpTgJobr8hPCHlxEf1FYY6CyeWKlWzAO07Ns4iMs49ov\n2qABgZf5WZADVwqxqdgq4JQD1V/L3c/FBp8kSYpVNGMmwc5ZM3+4lmq+/vY4\nezhu9yRiLFEMLr2rZPOi/rbyZmyOdp8YrTQV6oL/TSn64Jzj0UTzjMOlxhpV\n2276Vc+oi1p8ZAm8hQSXDfvGRk6tQ41kYfun3swqv6twIt9c4YZb3fRAPcTE\nq4DycY5byckx7oASkRDzEu7wvgguZpd4UaQd05n3mTHzUywiknr6VAcwSYI+\nFXq3kKRNRers/eda0k0KJ0xOI/HeZb/zl47WfcM+4CKZeUgUwcIy/Jtm8Bm2\nXk4lXTFtZavJH/mhqwErSn8gZ1Q3t54kAtgMblGYN1c74DMUlAKKKze5lcMp\ndNyy\r\n=DM+v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHy012TbGBg2vbxOZUyp/+PMrvR0tSEq9hg/Cjm4bFbzAiAgKXtNzQAvV2yxd4NZI4dL2esso/GJlDaiAwxaL++zWA=="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.25_1591875031012_0.9644296338475193"},"_hasShrinkwrap":false},"1.0.0-beta.26":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.26","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.26","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.26","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"a22b819aad9b425d5d0d2bb45aada31f0ecee42e","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then((info) => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then((updates) => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then((result) => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then((result) => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((file) => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((link) => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then((chat) => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then((admins) => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then((count) => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then((member) => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then((scores) => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.26","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-JT9jYk7+iIQy2ZOOYfLzzNaKv+vF2gD9/aIsk/HCsCjzK151nk+uubKYyTQVlFj3id0SP7fbWprqd3BjdVvr8w==","shasum":"92e8eb04c788da61a0b8e5017edf645269f057c8","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.26.tgz","fileCount":29,"unpackedSize":653098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6H0sCRA9TVsSAnZWagAAM0gP/1YXimphTPG4Opi9w6FZ\nRVJqRJknrnrj7awE1X/gp7Say4go2NRk9evkuwMX3pK8fCeG8p9aCmDuKi+K\nRtnHLN8h4HaIPrRDza9n1dAdBdQYzP3D5GP3301zhccA0VRwsv7uwFJd1uJs\nI1BrJPcvIKHkll1COSavz1MHEzSPQaRQYBucwds3Fngl+8CFxR3chmRlzBjy\nr+KzdfjPM32i8+n+uFLioHp4dpwqDY++hQ58iyoFsj6srBLAIKFof1K9XraI\nXO+J1W87KWD2zYdgYBffsWFt1U3MFmaubXFnDCg4ic9NdRNdyVTwJke9Yhg5\nrCidZq6ZOZSAifHJ2gZB7DdL2h7ewuqhRY7j70TZn7BOEYqdw8HJ59wo5YjD\n2arCxErB6BGwFlG2i8TcHqh2/Av22b1y3I5Pf7s3iWv+kQ93EBBf0PhNdKDJ\ncoQIf8cUqrh6jCjTFFi+mlwYfFjSLuw4hu0T+1I8YsChW/y5k/nltOpSugrH\nX1j8HF+BX9Q4qAVbWZKT07yWecEbaszwNdiP7TM+ruafta3iKJwARvgz0wnK\n0zu8jdfUmgQooj4lOq3RquU8JpFNOliFOMuH/38bZEGx5hecoHByqGkl/S6F\nw4wrftPwCMxMHi3K8Tv6GV/W3ky3lRQmnk8PD/bauFbPew16hdQ2CxknRe3L\n+91f\r\n=mCUG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxr8cns5r7Iq2eLyFzFQr2Ob5F9EOVzD0uNvJNREg8LQIhAPrJFiHyk7TNgPNyx2VmpB3Stk6zV1B3tT0LH/esQLSs"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.26_1592294699798_0.8001280885202011"},"_hasShrinkwrap":false},"1.0.0-beta.27":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.27","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"axios":"^0.19.2","axios-error":"^1.0.0-beta.27","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.26","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"38107f34a63c32cf0a1c7994c4c39a2d6034daa4","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then((info) => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then((updates) => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then((result) => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then((result) => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((file) => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((link) => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then((chat) => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then((admins) => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then((count) => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then((member) => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then((scores) => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.27","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-aP5F8gqxglHTDMvDC2ahtF/yWJVH/ek5iiu8BEwHJaZdXPttdssmd7toQhN6SlKVuL55EFf4or1ez8K0UVk4lA==","shasum":"3055b5955df1e72a61e1dfdf64063c5cdd984a9f","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.27.tgz","fileCount":29,"unpackedSize":653098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8ZeqCRA9TVsSAnZWagAA8EsP/RwvnuJsDr1zV8bvsmdJ\n13GbpaFFPy56GNef3sEksgGRrjtWgDFrAnIwPh9mWlLnN8MMf9ee9iRaOmgl\npL6DCmHYzTuewgz2zvYLE3DWD8qiHgpdegeuJ4oDM7agK8FfwHzRsAITTa3n\nWC7bvL4bK2SVtQRNZfKN5zdW4LIpUdHhqv6CYtCgQdif/9eSlRWpiNkMIgAF\nsshzD1dbVy8Paee4m1IRUS5lGX1FIUtarOb71oolgAzaW18Ztiy6AmTtlVUx\nGogQISIyeARhh29IHU/29ECTttc5HCQRbC5zcxfmRjQpynj+YnO6dwYQ/PAK\nw1YBR5okOJrznJrQKqrNM5YQy1lcD6mbtoELMeJhExFFQcWNqcTslA2lH2w0\nEiHnOWnPxDnf8QUlsrPad/8ojDB9r6Rqh3FjeKiYTX2fuPxMJNNiTTSNdfpX\nk0EFarBQ9zx5DnfwPoetxnJl73AnETGD2ZjuzU5iX9jfrReLgwR/5bEsI4IQ\nC8M9wYqxZCsoTM+8FcFHPQ/7bX4JsJPjF6XhK4vuWnc8mbb3npE2UvYVqXWO\nq2DddWTuPezB78sYoDyhT/D4j9O+iN5W1z3VsVbt/TGuxFZXyxfiq3jMTEu/\nfZMjrOlYVnMH7qVnQyON3zYSB9oa7eb+o532PclhRkvvC4/63RTBgF4RD2l4\n/QxS\r\n=r/OF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+WPS4fIVq6olmChE0S6/MtdZaDzdqp7Nw953EeNv6BAIhAP0RuCjanHqx8OdPUnusJ6xzUxeP+EGaABr7Ensre0vu"}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.27_1592891306340_0.8319500693941138"},"_hasShrinkwrap":false},"1.0.0-beta.29":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.29","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.19.2","axios-error":"^1.0.0-beta.27","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.29","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"3389b14efbdcaf968ed7476820edaaaa95da0772","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then((info) => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then((updates) => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then((result) => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then((result) => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((file) => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((link) => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then((chat) => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then((admins) => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then((count) => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then((member) => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then((scores) => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.29","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-vIpZxS/X1r5Jk3H2X5zI1mY5ujuJbB2+8bfv5dev7sQdKcFPtUOUAQxvZME0eRd4QC9igpJZEek7Qd2BDIy0UQ==","shasum":"edf3453a48a81e6d7c2fd6be69724d66a036926c","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.29.tgz","fileCount":29,"unpackedSize":653930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+W9DCRA9TVsSAnZWagAAj88P/ApyvAWTgGk45JnQpUGD\nsqSPAcn3tq4lik4g8vKsUTxDY1NiV1pX0PxOssoE3xBFh38Y2Y4e2W2d0LYT\nViq/QgW0wxYKIcn9joweG7udtM/IuF1xipfoArHs7cAZtpXXVYH0Kl+fZ7Br\npUvc/C784MZe8cEKjEmbD9YaG00GJaMLTnkZtXACge35xgFkM0/LLV5QZBk/\n4UDT+jh0/cZUd72CwNu7J+9993QhTR5Bokprw00JraV4aCZFr5SVv+6PQ7IC\nBSJr6ii6wFPYkZ58jC8yJrJAi050ZkXVZFVuJ6VBtjzpIXHOUUBfyWRlmz5s\nudatmSLtVe7llO+JrMlNfx/iFko/Q9iPqDEtZRBFcnCW6KpwriopoOo7tOa8\nkNWmewEruHcM0ENnEUr2mynDvgT32UQESTKLG/SSN7qcsmGhcNEtlaLxNxa1\n7KhpAdiK4gq6UOgi4zpeKXQ3ZH5BKavEG4ASIfcTvraiATI5LbQjNjBWQoLA\nfe7M/nQPMUXUCUqD3SfMxvy4JQ+SeIiM9ZfvtYKuMjsu98OOOL50GlLP2OKZ\nLa/be0/xGMWqk94zYroIYT08PXwTipJbsPOEijgJJvtEhDNXb5iavJcU4gRa\nWbJ+Lpl75h77FfHo09JteAshVnCg0wtQfT5A9pYQTMevh4WSwq/XROU4VAZP\nPQqb\r\n=1u95\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClh+ilg73M3WO9xw2tATHuyYD5K1Siivg7uch47APrGQIgH2t8xMyxCpvEuuUBZOba3+tHyapxgDciT9n6qaIHGSU="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.29_1593405250695_0.5761863742733497"},"_hasShrinkwrap":false},"1.0.0-beta.33":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.33","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.19.2","axios-error":"^1.0.0-beta.27","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.29","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"a3f7afb4cef3784c3459f6be0810e0518b1bb384","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then((info) => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then((updates) => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then((result) => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then((result) => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((file) => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((link) => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then((chat) => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then((admins) => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then((count) => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then((member) => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then((scores) => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.33","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-naE0DgYYdZOfkDMxDdEnDfUomzNB0TkOKS09YkpTVKjUCeB3JJenXfEtVqqk8digfxuDo9C9KdFLiPCZ1jW4uQ==","shasum":"dbf67e7e34cae9c5ea126f363214e2a66d6d13bd","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.33.tgz","fileCount":29,"unpackedSize":653856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF9++CRA9TVsSAnZWagAAOgIP/3FeBgRy5Qo8AREyI7IT\ndsX5sxCybNz1BYksC4DE28zXryMLIbZaSSlodwV5bbkg52Fc8mydntZ6j6Gk\nCpU4y3TGWrhFElogwBbRjd4PGKSdFSdlEIEfXLg8qO0dB8Oo+4pGcCj2giWi\nybkKdNI0Gix5DR2NcrKxC9ugUuTH8YVjZFZcJCYjOjJ1cEDnagU9VjC5Jy9/\nrNm/vvsoG1dK3Od5auPJUKgQ/7dpSnELIZsfU56XTeYXhamrV4SzFUc3PROU\nCdQLrx16lBJDDcoB5jtkYhTx2VOkLw9oyk7hk7G+2mWGfJ8gSIo2Sqgj5oJ1\nMrd8g7p38IvuSN6jTKGeyAjL63GTxNe0j82i0LdgOtEvowHYPE4z6gjNddRA\nNig4Q6vdZTTYZ8MVOI6k5w3ZLsqXy+cPxc4nXdkpbZGzE1XvlnMX1B29xoZV\nwTS7YvzxKte3C3HtdwcVw+fG5olOSgcfGYG7SMSwP8fKi8M0CVyxR9+JgQR1\nAlmUNcdY+4AhI/IHo5FrBq1vGQ32DhwI/6alGpZ0EuDhGQszcvyu/pn91L+j\n+9ErxUfIK90lrT30meD8pAZZOgSbqlunEFMeixvlJPTF8V7zWBGmrk3RgFJu\n4gY6J9Lhxsrj1I+o9n5w0rWQ7yDdg2a8k0cCg73keljV4eDvUXOdPe86Rc00\nR/XS\r\n=EvT4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE2veTUpep6empw/y7iijT7zZN6ZSc31reVXfp4xw8laAiEAnY+DHG4wFAuPkMcI3oUzdqavO0Oy7rWxVYQT7DghI+0="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.33_1595400126195_0.6508415774046172"},"_hasShrinkwrap":false},"1.0.0-beta.34":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0-beta.34","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.19.2","axios-error":"^1.0.0-beta.27","lodash":"^4.17.15","messaging-api-common":"^1.0.0-beta.29","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"dffb3adafba268a22ff08614dcdf9716ff7bb406","readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Test](#test)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient('12345678:AaBbCcDdwhatever');\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly `console.log` on the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n## `getWebhookInfo` - [Official Docs](https://core.telegram.org/bots/api#getwebhookinfo)\n\nGets current webhook status.\n\nExample:\n\n```js\nclient.getWebhookInfo().then((info) => {\n  console.log(info);\n  // {\n  //   url: 'https://4a16faff.ngrok.io/',\n  //   has_custom_certificate: false,\n  //   pending_update_count: 0,\n  //   max_connections: 40,\n  // }\n});\n```\n\n<br />\n\n## `getUpdates` - [Official Docs](https://core.telegram.org/bots/api#getupdates)\n\nUse this method to receive incoming updates using long polling. An Array of [Update](https://core.telegram.org/bots/api#update) objects is returned.\n\n| Param   | Type     | Description          |\n| ------- | -------- | -------------------- |\n| options | `Object` | Optional parameters. |\n\nExample:\n\n```js\nclient\n  .getUpdates({\n    limit: 10,\n  })\n  .then((updates) => {\n    console.log(updates);\n    /*\n      [\n        {\n          update_id: 513400512,\n          message: {\n            message_id: 3,\n            from: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n            },\n            chat: {\n              id: 313534466,\n              first_name: 'first',\n              last_name: 'last',\n              username: 'username',\n              type: 'private',\n            },\n            date: 1499402829,\n            text: 'hi',\n          },\n        },\n        ...\n      ]\n    */\n  });\n```\n\n<br />\n\n## `setWebhook(url)` - [Official Docs](https://core.telegram.org/bots/api#setwebhook)\n\nSpecifies a url and receive incoming updates via an outgoing webhook.\n\n| Param | Type     | Description                   |\n| ----- | -------- | ----------------------------- |\n| url   | `String` | HTTPS url to send updates to. |\n\nExample:\n\n```js\nclient.setWebhook('https://4a16faff.ngrok.io/');\n```\n\n<br />\n\n## `deleteWebhook` - [Official Docs](https://core.telegram.org/bots/api#deletewebhook)\n\nRemoves webhook integration.\n\nExample:\n\n```js\nclient.deleteWebhook();\n```\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n## `sendMessage(chatId, text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmessage)\n\nSends text messages.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| text    | `String`                          | Text of the message to be sent.                                          |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendMessage(CHAT_ID, 'hi', {\n  disable_web_page_preview: true,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendPhoto(chatId, photo [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendphoto)\n\nSends photos.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo   | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendPhoto(CHAT_ID, 'https://example.com/image.png', {\n  caption: 'gooooooodPhoto',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendAudio(chatId, audio [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendaudio)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| audio   | `String`                          | Pass a file id (recommended) or HTTP URL to send audio.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendAudio(CHAT_ID, 'https://example.com/audio.mp3', {\n  caption: 'gooooooodAudio',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendDocument(chatId, document [, options])` - [Official Docs](https://core.telegram.org/bots/api/#senddocument)\n\nSends general files.\n\n| Param    | Type                              | Description                                                              |\n| -------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId   | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| document | `String`                          | Pass a file id (recommended) or HTTP URL to send document.               |\n| options  | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendDocument(CHAT_ID, 'https://example.com/doc.gif', {\n  caption: 'gooooooodDocument',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendSticker(chatId, sticker [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendsticker)\n\nSends `.webp` stickers.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| sticker | `String`                          | Pass a file id (recommended) or HTTP URL to send sticker.                |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendSticker(CHAT_ID, 'CAADAgADQAADyIsGAAE7MpzFPFQX5QI', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideo(chatId, video [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideo)\n\nSends video files, Telegram clients support `mp4` videos (other formats may be sent as Document).\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| video   | `String`                          | Pass a file id (recommended) or HTTP URL to send video.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideo(CHAT_ID, 'https://example.com/video.mp4', {\n  caption: 'gooooooodVideo',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVoice(chatId, voice [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvoice)\n\nSends audio files.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| voice   | `String`                          | Pass a file id (recommended) or HTTP URL to send voice.                  |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVoice(CHAT_ID, 'https://example.com/voice.ogg', {\n  caption: 'gooooooodVoice',\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendVideoNote(chatId, videoNote [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvideonote)\n\nSends video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| videoNote | `String`                          | Pass a file id (recommended) or HTTP URL to send video note.             |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {\n  duration: 40,\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `sendMediaGroup(chatId, media [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendmediagroup)\n\nsend a group of photos or videos as an album.\n\n| Param   | Type                                                               | Description                                                                              |\n| ------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |\n| chatId  | <code>Number &#124; String</code>                                  | Unique identifier for the target chat or username of the target channel.                 |\n| media   | Array<[InputMedia](https://core.telegram.org/bots/api#inputmedia)> | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |\n| options | `Object`                                                           | Other optional parameters.                                                               |\n\nExample:\n\n```js\nclient.sendMediaGroup(CHAT_ID, [\n  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },\n]);\n```\n\n<br />\n\n## `sendLocation(chatId, location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendlocation)\n\nSends point on the map.\n\n| Param              | Type                              | Description                                                              |\n| ------------------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId             | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| location           | `Object`                          | Object contains latitude and longitude.                                  |\n| location.latitude  | `Number`                          | Latitude of the location.                                                |\n| location.longitude | `Number`                          | Longitude of the location.                                               |\n| options            | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendLocation(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendVenue(chatId, venue [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendvenue)\n\nSends information about a venue.\n\n| Param           | Type                              | Description                                                              |\n| --------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId          | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| venue           | `Object`                          | Object contains information of the venue.                                |\n| venue.latitude  | `Number`                          | Latitude of the venue.                                                   |\n| venue.longitude | `Number`                          | Longitude of the venue.                                                  |\n| venue.title     | `String`                          | Name of the venue.                                                       |\n| venue.address   | `String`                          | Address of the venue.                                                    |\n| options         | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendVenue(\n  CHAT_ID,\n  {\n    latitude: 30,\n    longitude: 45,\n    title: 'a_title',\n    address: 'an_address',\n  },\n  {\n    disable_notification: true,\n  }\n);\n```\n\n<br />\n\n## `sendContact(chatId, contact [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendcontact)\n\nSends phone contacts.\n\n| Param                | Type                              | Description                                                              |\n| -------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId               | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| contact              | `Object`                          | Object contains information of the contact.                              |\n| contact.phone_number | `String`                          | Phone number of the contact.                                             |\n| contact.first_name   | `String`                          | First name of the contact.                                               |\n| options              | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.sendContact(\n  CHAT_ID,\n  {\n    phone_number: '886123456789',\n    first_name: 'first',\n  },\n  { last_name: 'last' }\n);\n```\n\n<br />\n\n## `sendChatAction(chatId, action)` - [Official Docs](https://core.telegram.org/bots/api/#sendchataction)\n\nTells the user that something is happening on the bot's side.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| action | `String`                          | Type of action to broadcast.                                             |\n\nExample:\n\n```js\nclient.sendChatAction(CHAT_ID, 'typing');\n```\n\n<br />\n\n### Get API\n\n## `getMe` - [Official Docs](https://core.telegram.org/bots/api/#getme)\n\nGets bot's information.\n\nExample:\n\n```js\nclient.getMe().then((result) => {\n  console.log(result);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   username: 'a_bot'\n  // }\n});\n```\n\n<br />\n\n## `getUserProfilePhotos(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#getuserprofilephotos)\n\nGets a list of profile pictures for a user.\n\n| Param   | Type     | Description                           |\n| ------- | -------- | ------------------------------------- |\n| userId  | `String` | Unique identifier of the target user. |\n| options | `Object` | Other optional parameters             |\n\nExample:\n\n```js\nclient.getUserProfilePhotos(USER_ID, { limit: 1 }).then((result) => {\n  console.log(result);\n  // {\n  //   total_count: 3,\n  //   photos: [\n  //     [\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',\n  //         file_size: 14650,\n  //         width: 160,\n  //         height: 160,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',\n  //         file_size: 39019,\n  //         width: 320,\n  //         height: 320,\n  //       },\n  //       {\n  //         file_id:\n  //           'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',\n  //         file_size: 132470,\n  //         width: 640,\n  //         height: 640,\n  //       },\n  //     ],\n  //   ],\n  // }\n});\n```\n\n<br />\n\n## `getFile(fileId)` - [Official Docs](https://core.telegram.org/bots/api/#getfile)\n\nGets basic info about a file and prepare it for downloading.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFile('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((file) => {\n    console.log(file);\n    // {\n    //   file_id: 'UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2',\n    //   file_size: 106356,\n    //   file_path: 'photos/1068230105874016297.jpg',\n    // }\n  });\n```\n\n<br />\n\n## `getFileLink(fileId)`\n\nGets link of the file.\n\n| Param  | Type     | Description                        |\n| ------ | -------- | ---------------------------------- |\n| fileId | `String` | File identifier to get info about. |\n\nExample:\n\n```js\nclient\n  .getFileLink('UtAqweADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pM4A1UpI0koD65K2')\n  .then((link) => {\n    console.log(link);\n    // 'https://api.telegram.org/file/bot<ACCESS_TOKEN>/photos/1068230105874016297.jpg'\n  });\n```\n\n<br />\n\n## `getChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchat)\n\nGets up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChat(CHAT_ID).then((chat) => {\n  console.log(chat);\n  // {\n  //   id: 313534466,\n  //   first_name: 'first',\n  //   last_name: 'last',\n  //   username: 'username',\n  //   type: 'private',\n  // }\n});\n```\n\n<br />\n\n## `getChatAdministrators(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatadministrators)\n\nGets a list of administrators in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatAdministrators(CHAT_ID).then((admins) => {\n  console.log(admins);\n  // [\n  //   {\n  //     user: {\n  //       id: 313534466,\n  //       first_name: 'first',\n  //       last_name: 'last',\n  //       username: 'username',\n  //       languange_code: 'zh-TW',\n  //     },\n  //     status: 'creator',\n  //   },\n  // ]\n});\n```\n\n<br />\n\n## `getChatMembersCount(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmemberscount)\n\nGets the number of members in a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.getChatMembersCount(CHAT_ID).then((count) => {\n  console.log(count); // '6'\n});\n```\n\n<br />\n\n## `getChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#getchatmember)\n\nGets information about a member of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.getChatMember(CHAT_ID, USER_ID).then((member) => {\n  console.log(member);\n  // {\n  //   user: {\n  //     id: 313534466,\n  //     first_name: 'first',\n  //     last_name: 'last',\n  //     username: 'username',\n  //     languange_code: 'zh-TW',\n  //   },\n  //   status: 'creator',\n  // }\n});\n```\n\n<br />\n\n### Updating API\n\n## `editMessageText(text [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagetext)\n\nEdits text and game messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| text                      | `String`                          | New text of the message.                                                 |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageText('new_text', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageCaption(caption [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagecaption)\n\nEdits captions of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| caption                   | `String`                          | New caption of the message.                                              |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageCaption('new_caption', { message_id: MESSAGE_ID });\n```\n\n<br />\n\n## `editMessageReplyMarkup(replyMarkup [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagereplymarkup)\n\nEdits only the reply markup of messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| replyMarkup               | `Object`                          | New replyMarkup of the message.                                          |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageReplyMarkup(\n  {\n    keyboard: [[{ text: 'new_button_1' }, { text: 'new_button_2' }]],\n    resize_keyboard: true,\n    one_time_keyboard: true,\n  },\n  { message_id: MESSAGE_ID }\n);\n```\n\n<br />\n\n## `deleteMessage(chatId, messageId)` - [Official Docs](https://core.telegram.org/bots/api/#deletemessage)\n\nDeletes a message, including service messages.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of the message to delete.                                     |\n\nExample:\n\n```js\nclient.deleteMessage(CHAT_ID, MESSAGE_ID);\n```\n\n<br />\n\n## `editMessageLiveLocation(location [, options])` - [Official Docs](https://core.telegram.org/bots/api/#editmessagelivelocation)\n\nEdit live location messages sent by the bot or via the bot (for inline bots).\n\n| Param                     | Type                              | Description                                                              |\n| ------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| location                  | `Object`                          | Object contains new latitude and longitude.                              |\n| location.latitude         | `Number`                          | Latitude of new location.                                                |\n| location.longitude        | `Number`                          | Longitude of new location.                                               |\n| options                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| options.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| options.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| options.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.editMessageLiveLocation(\n  {\n    latitude: 30,\n    longitude: 45,\n  },\n  {\n    message_id: MESSAGE_ID,\n  }\n);\n```\n\n<br />\n\n## `stopMessageLiveLocation(options)` - [Official Docs](https://core.telegram.org/bots/api/#stopmessagelivelocation)\n\nStop updating a live location message sent by the bot or via the bot (for inline bots) before _live_period_ expires.\n\n| Param                        | Type                              | Description                                                              |\n| ---------------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| identifier                   | `Object`                          | One of chat_id, message_id or inline_message_id is required.             |\n| identifier.chat_id           | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| identifier.message_id        | `Number`                          | Identifier of the sent message.                                          |\n| identifier.inline_message_id | `String`                          | Identifier of the inline message.                                        |\n\nExample:\n\n```js\nclient.stopMessageLiveLocation({ message_id: MESSAGE_ID });\n```\n\n### Group API\n\n## `kickChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#kickchatmember)\n\nKicks a user from a group, a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.kickChatMember(CHAT_ID, USER_ID, { until_date: UNIX_TIME });\n```\n\n<br />\n\n## `unbanChatMember(chatId, userId)` - [Official Docs](https://core.telegram.org/bots/api/#unbanchatmember)\n\nUnbans a previously kicked user in a supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId | `Number`                          | Unique identifier of the target user.                                    |\n\nExample:\n\n```js\nclient.unbanChatMember(CHAT_ID, USER_ID);\n```\n\n<br />\n\n## `restrictChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#restrictchatmember)\n\nRestricts a user in a supergroup\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.restrictChatMember(CHAT_ID, USER_ID, { can_send_messages: true });\n```\n\n<br />\n\n## `promoteChatMember(chatId, userId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#promotechatmember)\n\nPromotes or demotes a user in a supergroup or a channel.\n\n| Param   | Type                              | Description                                                              |\n| ------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| userId  | `Number`                          | Unique identifier of the target user.                                    |\n| options | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.promoteChatMember(CHAT_ID, USER_ID, {\n  can_change_info: true,\n  can_invite_users: true,\n});\n```\n\n<br />\n\n## `exportChatInviteLink(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#exportchatinvitelink)\n\nExports an invite link to a supergroup or a channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.exportChatInviteLink(CHAT_ID);\n```\n\n<br />\n\n## `setChatPhoto(chatId, photo)` - [Official Docs](https://core.telegram.org/bots/api/#setchatphoto)\n\nSets a new profile photo for the chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| photo  | `String`                          | Pass a file id (recommended) or HTTP URL to send photo.                  |\n\nExample:\n\n```js\nclient.setChatPhoto(CHAT_ID, 'https://example.com/image.png');\n```\n\n<br />\n\n## `deleteChatPhoto(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatphoto)\n\nDeletes a chat photo.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatPhoto(CHAT_ID);\n```\n\n<br />\n\n## `setChatTitle(chatId, title)` - [Official Docs](https://core.telegram.org/bots/api/#setchattitle)\n\nChanges the title of a chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| title  | `String`                          | New chat title, 1-255 characters.                                        |\n\nExample:\n\n```js\nclient.setChatTitle(CHAT_ID, 'New Title');\n```\n\n<br />\n\n## `setChatDescription(chatId, description)` - [Official Docs](https://core.telegram.org/bots/api/#setchatdescription)\n\nChanges the description of a supergroup or a channel.\n\n| Param       | Type                              | Description                                                              |\n| ----------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId      | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| description | `String`                          | New chat description, 0-255 characters.                                  |\n\nExample:\n\n```js\nclient.setChatDescription(CHAT_ID, 'New Description');\n```\n\n<br />\n\n## `setChatStickerSet(chatId, stickerSetName)` - [Official Docs](https://core.telegram.org/bots/api/#setchatstickerset)\n\nSet a new group sticker set for a supergroup.\n\n| Param          | Type                              | Description                                                              |\n| -------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId         | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| stickerSetName | `String`                          | Name of the sticker set to be set as the group sticker set.              |\n\nExample:\n\n```js\nclient.setChatStickerSet(CHAT_ID, 'Sticker Set Name');\n```\n\n<br />\n\n## `deleteChatStickerSet(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#deletechatstickerset)\n\nDelete a group sticker set from a supergroup.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.deleteChatStickerSet(CHAT_ID);\n```\n\n<br />\n\n## `pinChatMessage(chatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#pinchatmessage)\n\nPins a message in a supergroup.\n\n| Param     | Type                              | Description                                                              |\n| --------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId    | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| messageId | `Number`                          | Identifier of a message to pin.                                          |\n| options   | `Object`                          | Other optional parameters.                                               |\n\nExample:\n\n```js\nclient.pinChatMessage(CHAT_ID, MESSAGE_ID, { disable_notification: true });\n```\n\n<br />\n\n## `unpinChatMessage(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#unpinchatmessage)\n\nUnpins a message in a supergroup chat.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.unpinChatMessage(CHAT_ID);\n```\n\n<br />\n\n## `leaveChat(chatId)` - [Official Docs](https://core.telegram.org/bots/api/#leavechat)\n\nLeaves a group, supergroup or channel.\n\n| Param  | Type                              | Description                                                              |\n| ------ | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n\nExample:\n\n```js\nclient.leaveChat(CHAT_ID);\n```\n\n<br />\n\n### Payments API\n\n## `sendInvoice(chatId, product [, options])` - [Official Docs](https://core.telegram.org/bots/api/#sendinvoice)\n\nSends invoice.\n\n| Param                   | Type                              | Description                                                              |\n| ----------------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId                  | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| product                 | `Object`                          | Object of the product.                                                   |\n| product.title           | `String`                          | Product name.                                                            |\n| product.description     | `String`                          | Product description.                                                     |\n| product.payload         | `String`                          | Bot defined invoice payload.                                             |\n| product.provider_token  | `String`                          | Payments provider token.                                                 |\n| product.start_parameter | `String`                          | Deep-linking parameter.                                                  |\n| product.currency        | `String`                          | Three-letter ISO 4217 currency code.                                     |\n| product.prices          | `Array<Object>`                   | Breakdown of prices.                                                     |\n| options                 | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendInvoice(CHAT_ID, {\n  title: 'product name',\n  description: 'product description',\n  payload: 'bot-defined invoice payload',\n  provider_token: 'PROVIDER_TOKEN',\n  start_parameter: 'pay',\n  currency: 'USD',\n  prices: [\n    { label: 'product', amount: 11000 },\n    { label: 'tax', amount: 11000 },\n  ],\n});\n```\n\n<br />\n\n## `answerShippingQuery(shippingQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answershippingquery)\n\nReply to shipping queries.\n\n| Param           | Type      | Description                                     |\n| --------------- | --------- | ----------------------------------------------- |\n| shippingQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok              | `Boolean` | Specify if delivery of the product is possible. |\n| options         | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerShippingQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n## `answerPreCheckoutQuery(preCheckoutQueryId, ok [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerprecheckoutquery)\n\nRespond to such pre-checkout queries.\n\n| Param              | Type      | Description                                     |\n| ------------------ | --------- | ----------------------------------------------- |\n| preCheckoutQueryId | `String`  | Unique identifier for the query to be answered. |\n| ok                 | `Boolean` | Specify if delivery of the product is possible. |\n| options            | `Object`  | Additional Telegram query options.              |\n\nExample:\n\n```js\nclient.answerPreCheckoutQuery('UNIQUE_ID', true);\n```\n\n<br />\n\n### Inline mode API\n\n## `answerInlineQuery(inlineQueryId, results [, options])` - [Official Docs](https://core.telegram.org/bots/api/#answerinlinequery)\n\nSend answers to an inline query.\n\n| Param         | Type                                                                             | Description                                               |\n| ------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| inlineQueryId | `String`                                                                         | Unique identifier of the query.                           |\n| results       | Array<[InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)> | Array of object represents one result of an inline query. |\n| options       | `Object`                                                                         | Additional Telegram query options.                        |\n\nExample:\n\n```js\nclient.answerInlineQuery(\n  'INLINE_QUERY_ID',\n  [\n    {\n      type: 'photo',\n      id: 'UNIQUE_ID',\n      photo_file_id: 'FILE_ID',\n      title: 'PHOTO_TITLE',\n    },\n    {\n      type: 'audio',\n      id: 'UNIQUE_ID',\n      audio_file_id: 'FILE_ID',\n      caption: 'AUDIO_TITLE',\n    },\n  ],\n  {\n    cache_time: 1000,\n  }\n);\n```\n\n<br />\n\n### Game API\n\n## `sendGame(chatId, gameShortName [, options])` - [Official Docs](https://core.telegram.org/bots/api#sendgame)\n\nSends a game.\n\n| Param         | Type                              | Description                                                              |\n| ------------- | --------------------------------- | ------------------------------------------------------------------------ |\n| chatId        | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target channel. |\n| gameShortName | String                            | Short name of the game.                                                  |\n| options       | `Object`                          | Additional Telegram query options.                                       |\n\nExample:\n\n```js\nclient.sendGame(CHAT_ID, 'Mario Bros.', {\n  disable_notification: true,\n});\n```\n\n<br />\n\n## `setGameScore(userId, score [, options])` - [Official Docs](https://core.telegram.org/bots/api#setgamescore)\n\nSets the score of the specified user in a game.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| score   | Number                            | New score, must be non-negative.   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.setGameScore(USER_ID, 999);\n```\n\n<br />\n\n## `getGameHighScores(userId [, options])` - [Official Docs](https://core.telegram.org/bots/api#getgamehighscores)\n\nGets data for high score tables.\n\n| Param   | Type                              | Description                        |\n| ------- | --------------------------------- | ---------------------------------- |\n| userId  | <code>Number &#124; String</code> | User identifier.                   |\n| options | `Object`                          | Additional Telegram query options. |\n\nExample:\n\n```js\nclient.getGameHighScores(USER_ID).then((scores) => {\n  console.log(scores);\n  // [\n  //   {\n  //     position: 1,\n  //     user: {\n  //       id: 427770117,\n  //       is_bot: false,\n  //       first_name: 'first',\n  //     },\n  //     score: 999,\n  //   },\n  // ]\n});\n```\n\n<br />\n\n### Others\n\n## `forwardMessage(chatId, fromChatId, messageId [, options])` - [Official Docs](https://core.telegram.org/bots/api/#forwardmessage)\n\nForwards messages of any kind.\n\n| Param      | Type                              | Description                                                                            |\n| ---------- | --------------------------------- | -------------------------------------------------------------------------------------- |\n| chatId     | <code>Number &#124; String</code> | Unique identifier for the target chat or username of the target supergroup or channel. |\n| fromChatId | <code>Number &#124; String</code> | Unique identifier for the chat where the original message was sent.                    |\n| messageId  | `Number`                          | Message identifier in the chat specified in from_chat_id.                              |\n| options    | `Object`                          | Other optional parameters.                                                             |\n\nExample:\n\n```js\nclient.forwardMessage(CHAT_ID, USER_ID, MESSAGE_ID, {\n  disable_notification: true,\n});\n```\n\n## Debug Tips\n\n### Log requests details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api-telegram\n```\n\nIf you want to use custom request logging function, just define your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Test\n\n### Point requests to your dummy server\n\nTo avoid sending requests to real Telegram server, specify `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on production server.\n\n### Manual Mock with [Jest](https://facebook.github.io/jest/)\n\ncreate `__mocks__/messaging-api-telegram.js` in your project root:\n\n```js\n// __mocks__/messaging-api-telegram.js\nconst jestMock = require('jest-mock');\nconst { TelegramClient } = require.requireActual('messaging-api-telegram');\n\nmodule.exports = {\n  TelegramClient: {\n    connect: jest.fn(() => {\n      const Mock = jestMock.generateFromMetadata(\n        jestMock.getMetadata(TelegramClient)\n      );\n      return new Mock();\n    }),\n  },\n};\n```\n\nThen, mock `messaging-api-telegram` package in your tests:\n\n```js\n// __tests__/mytest.spec.js\njest.mock('messaging-api-telegram');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0-beta.34","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-+wpsFSsUOpixSqnpZFGe+PZ1yvdZAp5YVwW+JJTW/+sXDaxkmzGfh/5S4WLWWOw9PvG4maQnhy5d6y3TGTemqw==","shasum":"2dd4a59ffe8c396dfd820b7069da22b20ae171bd","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0-beta.34.tgz","fileCount":29,"unpackedSize":653856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVdDpCRA9TVsSAnZWagAAxa0P/1ogDrRqKMWQrOefr7sq\nKtMz0nnytqWvmwMOaKiHPhqQZXj8D6cmGMSkDWM6RQfBOablMZ0qb+o7+T5Q\niYgcSiOC/aR7HuN95vaZZ7VYeZANtMS0nzpAWCynjLrRQ0oo/pbFEdkMH7E6\nui4DGB2QPYUuTWNysh8QrJu7J4cFCCwL4/+gZ1WBs2mjf8deQcwkQ6TB9VXl\nJKJuy3NQnCrINEJYLSWfT00orKu7StmfVP4T67JSdffwLFXaNnsXmWmNmYb0\ng9IkgemD4T/6pxCCf/BazvP7+WmOhTlT8aQPiI50SYBfsym6Pqw+Q9sGEHgf\n9J2TLBBtEaGXw8qRExYlZWL69SwkQyAePGFhb9OaPgrYxArY9SV2YekPsV/d\nuGfEULytZklND6at9au0iS0eEiQDZSHtKMEYtBo/hih1Nkn+S64fiS6+J35m\nnw+4BlYbeVDvYbqBcsiSUU56Dqivh+dU0NadrLvzf8QnBKuPaUTsW1O3Y1It\nWKWkp4CirWwRaZvCYfioXNakkHb+5xejT7q1PEiN/Sl6buzcbOb3dVGlZvPm\nF+Hy8yR7gnM/W/0I5jBeBFIqBMFzyJAqiRdImgy1HqO72p++k1QoUqa5OmKA\nQTtKFlRz9+kXPkokcvbsjDbFO4pPirfL/5UdMZl9BXUZSMvKiylu1C1lnUCB\nzdup\r\n=Fxe/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDXrrdpGxXCiSqs/scHj85FFVUd/AIQQAWBqEOLk70PwIgMKe3i8Uzl9U4d6T2DAd4Opgr0Z3EuyoKtFktN+yEglE="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0-beta.34_1599459561329_0.3670556471956443"},"_hasShrinkwrap":false},"1.0.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.0","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.19.2","axios-error":"^1.0.0","lodash":"^4.17.15","messaging-api-common":"^1.0.0","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"879afbd4bebbbb480dd5c1bd32e7cdcc5127437c","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.0","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-hA2LFclQV5sVGGIYosdYvhap0GrPD73GuNjYi/T9rKZhn9qA5wTihrHNXdJHmUI7QOTT3JnA3QRdkwc9wkFZuA==","shasum":"60fd5a60920ea2c0630ae3b3e0434e694bb97fdf","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.0.tgz","fileCount":29,"unpackedSize":670882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVfVZCRA9TVsSAnZWagAA3qQQAIJ2IjF3bDJ6+2Sv7Vsk\nCh9xYj54IM2/tAxD380JQCZ0YmTwKMxvyLuEi0gh5kcjux8XxTckbCXMMnVp\nCkbBK392g4ku15BnIZfc+99IGBxE9fcIdGFLLow6pvhPxQVBbP3tt6x2M7BE\nCgNX+gncald2Be8PFTNGJ3B/c/o30sOxdNE7kdF5kfGJO4qzFj2My+zFPK7A\nU/aWeXfA+qpBSQGsBadp0LpmTOdeaoGajUUjSsGGjS4hK/v5rK916KzQSRxX\nfqWTzboeTHbypqDpxftC8a5mV7C4uhoCDDsI6e7U7eHtlispRKLkEdMkelMX\nr2kKhchnAzeS6FgkIFiaqbkUD+SFFZPJv/JNzfX8fcvu5epLgw9xY2359jkt\nS41cd5BawuYU2LiCgTJ+/S45oBT+tn+MDVZdvWTzyk4x5VoBEIQ4qzgT5BHS\nAHk6IbDOW/AK6pfqVVFmNYpuirl1Z14sbgLiJBKmT1v2JEpnW4JzP27rIl+W\nChv8oNOwwAMI0k2BjJiPX7qsNptQ5YmnWpObaB8bMIL9fofx0cX+pPXYRFeg\nt/92bCiTLHK91OJ2ksJ9JnCzg3MnBUFsuHvUM3o5wRuxs2buxlrB89m61qx+\nx6G3CzkKgAkWB6SfqCKJywPxNTyBzthjHGEA4rHJYvv1qW4Q4vy5c+cVKgpp\nOdSx\r\n=GRIJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaGSQXdeD7YIJpSRkerIdpW1kzJk4d6+ksR6LSJg3xNAiEAwJGDRzmbkT0iv7OleaLraoB0PAJLEKpvtnNg+murp5M="}]},"maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"s92f002@gmail.com","name":"kpman"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.0_1599468888789_0.24855453590318577"},"_hasShrinkwrap":false},"1.0.1":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.1","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.19.2","axios-error":"^1.0.0","lodash":"^4.17.15","messaging-api-common":"^1.0.0","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"cc72282a84bd6f2176f63bec462b15ae4dd37265","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.1","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-ePvDHA+qVfsazjRZtEeI2/dPtb8BJQeG3sMTpwSB5eKKUqT1HP6iKkvhvG5Co1C9LFTVVnAHGcdEE+v79YDBeA==","shasum":"fa776f41eb0654b1085b8402935cf38ce351faaf","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.1.tgz","fileCount":29,"unpackedSize":660747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaFDWCRA9TVsSAnZWagAAQ6kP/RoMNqoYOEAaoDNwSf++\ntiyF6Hpj0D+4/gpFt/MK9GNqGPNI15uj24z5UkHyE/Aoj5pafgGLLsh8w19f\nXEE7tw1YBJJRVRCGSxAAnzEl3Y0A2XmV9fptl+fT1yLCdVsePI5tfT4PXUKz\n7CISKC+47HkUui8M8SfryVfeCN697Gy6tHYFQ8BOl9Jjrwgo3CzGtYxRctWQ\nlNg0R03HzTnY6KvPM0Au62VJr/BItMOub0AasyOCpZfudRpM4OKJqAqgMPKn\nfXvoZ+q/bHEpW4BqO5GfofpqELQbaOl7AfXItqbh98YBCRbb36c6xcNNQb3n\nqlOqy0BXjmh2P5GhezRwdO0kWBQW5vy+arzVXLnl6uHBmOjT06oep5/HDntW\nrJxv/Lnw/TyFqnBuu7S/h1gG/7J0/BiBVZLwA7N2TtC4hPMif7jZWSio27y2\ne6A44XLmsy4EiFwk7HAPqkq+3X+bFvFWl+2ntKpY4Du+g7bsJLqIl40V8Zkk\nNwiuUCl7FHUBqC0XGTm3OX5AAw4JPeUBIzEQbP/fXkduv0r4lAwRVWE6pMl9\nUs7Xf2Fnw6vL46K428LMGG6yG1wwkCA1BEtN05dchYlKnD5TOZpAEh6WY6tZ\n/uZ+UOqSWr9QY/nxFaGD8BVRgZ2c1Kw89NCOIKBipw0+KFdxmG+T3dHuNh4G\ntIlx\r\n=xadh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyn2jH1Un8W/ZvJv3KpW7z6CnWOIe1LAvfe3QYXKynnAiEA+LNFPYDfYMrMRiKEjinxO7On3MATowRVrijLlcfsEPE="}]},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"},{"name":"kpman","email":"s92f002@gmail.com"},{"name":"tw0517tw","email":"tw0517tw@gmail.com"}],"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.1_1600671958438_0.7888330236678545"},"_hasShrinkwrap":false},"1.0.4":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.4","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.21.1","axios-error":"^1.0.4","lodash":"^4.17.15","messaging-api-common":"^1.0.4","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"8d0a6e0549448e353ce90878b2fe1d71db1d0596","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.4","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (darwin)","dist":{"integrity":"sha512-tDEKlwPMrpbBSIbEuYI1sJhAbn858HypB5QOLdatL0u/sBGrtp5yte52xgOfb7ySnzRqI2eH6C588VFyimHwBA==","shasum":"23f401a613008fc3e2e006a980d7fd14b7602500","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.4.tgz","fileCount":29,"unpackedSize":660747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf++q3CRA9TVsSAnZWagAA5WYP/iVaY/0/iE8oR1jEQpmU\ncA+c9qXWaMz9crPim7ImSNakPzsL61ZzuvEq/WAZ6evM9Ww76v3+jGXolI2C\nlYH/xmQha7viRyRf77yXL1pUaEYVKzoOcz0N5oLet07jVgJdwXCgphSjWtxq\n6nR1QzkG2vw2EwaG3gBcVfBqyYuvP0SoCDt2/1N+fqBc4ON2madX4cw9Vlgq\nyIakQiQbY39ZI/bWONRRtMwMEA4XXUZcjMc6erYvw8mm3j1qMZNzrgXPNydv\nLnUbNL/JaDmoAypMzK5omuYKWIOVaFva09rXNBbU4x6JaDhiqPNa/kQu4Ta7\nIegcnViLibJsQjRQYpEzGALu5t1gREQNDmgC9OTa7hZbHdt851urIGchvhCg\nMEnLze+pdv0TboBd7VqoBgnEMmfsqAagD8qbw21dSFcj0xw7Pe+DbaiwmdUF\n/J2ewEh/IQPKANEAzVKJox5wMXAaQmK97ifAwgLVTbqPw/NrViMB2Sac+zEr\nMJMr2N2e5NOutps9vNabVTIybGrCeQ0N7pkyJqyQaxBN3e3qgQlM70y8/r3b\n2FUaOfbIaizmwreAiCDyYe3KIG+plKG53CfOxbfo1ZEV9bcNWV9CG99zeLpj\nybMdamyrpQqeoZoWvdT8OPwKWGfIoaGs1yBGVn0JzUDXWq+Ei7UfK2xn6dzI\nPzye\r\n=De2X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEh2YwZqiTVlIs/qWQsEzHXK5z4fK8aHA7LB5XjrX9lWAiBpsY00xMmSHaa6ljWbWO+yI0VE/Tj/j3DKTWFtU260TQ=="}]},"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"},{"name":"kpman","email":"s92f002@gmail.com"},{"name":"tw0517tw","email":"tw0517tw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.4_1610345143044_0.600175035826769"},"_hasShrinkwrap":false},"1.0.6":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.0.6","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.21.1","axios-error":"^1.0.4","lodash":"^4.17.15","messaging-api-common":"^1.0.4","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"785284584a31f3c3a9daa63497ba7b0d6b7a2eb4","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.0.6","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (darwin)","dist":{"integrity":"sha512-DX2R1DcnSx4fLvlGAJliSJjixhIaZdXigCtamuBSuNHPIW75WDoOgNtJekK2sJlNW6+Us3wppkkxlg/IukNn/Q==","shasum":"16aeb10ec60ee28b2f934787089cc4af4de911ae","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.0.6.tgz","fileCount":29,"unpackedSize":660860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMQrYCRA9TVsSAnZWagAA97oQAIOLuUZhs+03hGJK8llK\noUNcD694/TET+UxlgYMFsNcfLJjHFTFICvtOTGXeIcLbNdIuECFK4a16M9sl\nX33ZEisio1uuAdRcBBw1Sj+03yCAcjULPGnDLxYgDDgOF8ZkfMPdyPK8z9/w\nY+MJ4EnNUDjR+3t5Wo35JumHEENKcWRkLaOQxv+SlY0IKWxYHBGs2jxE1wOj\nNunYOtzWk1V/GoUyAlE4GS8qFnTfjU0bEGwPcF+hIhfc46lmDdhA9b6Erpl4\nbZzNPoLG/9unphwvis8Xa4BOAQpjyOd0JBXLS3xT+NPVbhFD0bBWbLced3zQ\nPg/ssko1po9gVsJce/QHOGn7WM5hEpz0btpf7/Ge1dQXNpHqLy+au467Im+e\nollWdIrCD02FzAOlU85/KNjisTySqbxPw8LN7bAfDW7zkxtjSwbkRQKqldck\njZ4hL/GKEgJakhuv+eOrxbXyUkOwUGcYC1d9l9elgljDUryrdqMypQsBE8dC\nPhPNZdY+5eBDHIhJML6YvImITyHIen1w12xA9OCV6Z4PJ1DOVMnHO3HlK9Q0\nCTTcbwlMZIED5qC1nRRhInjQAwAvmach6s89d6xUtJYVya/R3QXIW4w/37UA\nmGa1kQbI/XB4tUzh1Yjgs6+OaxsHn//+vljIiBmIx/WepZLw1UcvJ161HXee\nnJPv\r\n=hM1m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCmU5lfRgL0JUnjuAX1ONxR7jCc78cuu6t2LfeglIgxgIhAMH5FdZTEzHJCRSQpM0RJ2xh9us0aCWytMowm2a+mVLi"}]},"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"},{"name":"kpman","email":"s92f002@gmail.com"},{"name":"tw0517tw","email":"tw0517tw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.0.6_1630603992670_0.6983360084717505"},"_hasShrinkwrap":false},"1.1.0":{"name":"messaging-api-telegram","description":"Messaging API client for Telegram","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"version":"1.1.0","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@types/lodash":"^4.14.156","@types/warning":"^3.0.0","axios":"^0.21.1","axios-error":"^1.0.4","lodash":"^4.17.15","messaging-api-common":"^1.0.4","ts-invariant":"^0.4.4","warning":"^4.0.3"},"keywords":["bot","chatbot","messaging-apis","telegram"],"engines":{"node":">=10"},"gitHead":"7df9e3bba37712e0892f14895576c42c949d3003","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"},"homepage":"https://github.com/Yoctol/messaging-apis#readme","_id":"messaging-api-telegram@1.1.0","_nodeVersion":"14.17.5","_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (darwin)","dist":{"integrity":"sha512-HipK6m4N7KDpT6EW2USMDYckXPSdyAYOETfmrBTCCSLQOeIy/J6z/z3fQ5JF4jKideMhkRpgyhH2roPqTDWE7A==","shasum":"ad030067b115243845bfaa2d37ae430461471e8d","tarball":"https://registry.npmjs.org/messaging-api-telegram/-/messaging-api-telegram-1.1.0.tgz","fileCount":29,"unpackedSize":557716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2zFyCRA9TVsSAnZWagAA7pQQAIic0Dt2ztA1N0a1KMLG\nsef2b6LLdZtvIcShCCPGY7DWKo8yiGD2KhZi4lw5wQUPW6ha8cIQvMsWVCqu\nOzP7MU3Do8DVmzlkYjuRDJnwrWmbX6K930Yo2Mh91brdCCLpsj9xyY+Vixxh\nRAR36qcmU+v4PdsqnEs8gXvDzcQlGh4co83IHlibVoogO/SE/N9YMtNlYvOV\nJ9yqqSIc00rjURWDByU7cmjCd5sqvvJerzKT3PPdIzsEzeIEh6iNxvGJCRQ8\nQ+n9tZ7pDC3EAjet4dYdFmRPITGOI5J/2fZ9diqoD+Hry33nmbyuGq/Fa7qA\nNBZiiOE4wrW9SeGsRUvuFvJkJpWITQJhADKNCTRVlb6PFscAXxr7lGfFMIHw\nzSoCV71wHdZvUU8q26t/dJcwBNG2nX0LLqqOLMUKOBCX/Le6TRbjgvSbLdnM\ncPYErASPTsf3k71bvu6xUSiAjX0ZWHLA0puWjvwHDFCCwYmT3nk7STJCzsVa\nepNkDKWTna+QTHm6RpGYfj/gesKF6LenimrvHx+S9oC0KjrbLppWTWN8M1FJ\nAxlTNgX3LbANrREwPAufO+vayzjfjEFjhYNCBV1oezSVS2sYXu/9vBk+A4tG\n7UPRkF9vTbQVOwIQUk8qsJBPya/RaiKzi2b44jg8kXg1ODyKhAqMmRieT4vP\nGTnf\r\n=zEQ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2wcaN3vj8/bT2qMf1zymGYBECJxS7p5LTtgc+oYuMQQIgJ3f2HHcJebSuTGJH1Vt2xVEUgFgx87TRc8MZxD+MUmI="}]},"_npmUser":{"name":"chentsulin","email":"chentsulin@gmail.com"},"directories":{},"maintainers":[{"name":"chentsulin","email":"chentsulin@gmail.com"},{"name":"kpman","email":"s92f002@gmail.com"},{"name":"tw0517tw","email":"tw0517tw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messaging-api-telegram_1.1.0_1633326870707_0.753816775969701"},"_hasShrinkwrap":false}},"readme":"# messaging-api-telegram\n\n> Messaging API client for Telegram\n\n<img src=\"https://telegram.org/img/t_logo.png\" alt=\"Telegram\" width=\"150\" />\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n  - [Webhook API](#webhook-api)\n  - [Send API](#send-api)\n  - [Get API](#get-api)\n  - [Updating API](#updating-api)\n  - [Group API](#group-api)\n  - [Payments API](#payments-api)\n  - [Inline Mode API](#inline-mode-api)\n  - [Game API](#game-api)\n  - [Others](#others)\n- [Debug Tips](#debug-tips)\n- [Testing](#testing)\n\n## Installation\n\n```sh\nnpm i --save messaging-api-telegram\n```\n\nor\n\n```sh\nyarn add messaging-api-telegram\n```\n\n<br />\n\n## Usage\n\n### Initialize\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\n// get accessToken from telegram [@BotFather](https://telegram.me/BotFather)\nconst client = new TelegramClient({\n  accessToken: '12345678:AaBbCcDdwhatever',\n});\n```\n\n### Error Handling\n\n`messaging-api-telegram` uses [axios](https://github.com/axios/axios) as HTTP client. We use [axios-error](https://github.com/Yoctol/messaging-apis/tree/master/packages/axios-error) package to wrap API error instances for better formatting error messages. Directly calling `console.log` with the error instance will return formatted message. If you'd like to get the axios `request`, `response`, or `config`, you can still get them via those keys on the error instance.\n\n```js\nclient.getWebhookInfo().catch((error) => {\n  console.log(error); // formatted error message\n  console.log(error.stack); // error stack trace\n  console.log(error.config); // axios request config\n  console.log(error.request); // HTTP request\n  console.log(error.response); // HTTP response\n});\n```\n\n<br />\n\n## API Reference\n\nAll methods return a Promise.\n\n<br />\n\n### Webhook API\n\n- [getWebhookInfo](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getwebhookinfo)\n- [getUpdates](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getupdates)\n- [setWebhook](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#setwebhook)\n- [deleteWebhook](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#deletewebhook)\n\n<br />\n\n<a id=\"send-api\" />\n\n### Send API - [Official Docs](https://core.telegram.org/bots/api#available-methods)\n\n- [sendMessage](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendmessage)\n- [sendPhoto](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendphoto)\n- [sendAudio](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendaudio)\n- [sendDocument](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#senddocument)\n- [sendSticker](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendsticker)\n- [sendVideo](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendvideo)\n- [sendVoice](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendvoice)\n- [sendVideoNote](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendvideonote)\n- [sendMediaGroup](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendmediagroup)\n- [sendLocation](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendlocation)\n- [sendVenue](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendvenue)\n- [sendContact](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendcontact)\n- [sendChatAction](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendchataction)\n\n<br />\n\n### Get API\n\n- [getMe](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getme)\n- [getUserProfilePhotos](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getuserprofilephotos)\n- [getFile](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getfile)\n- [getFileLink](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getfilelink)\n- [getChat](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getchat)\n- [getChatAdministrators](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getchatadministrators)\n- [getChatMembersCount](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getchatmemberscount)\n- [getChatMember](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getchatmember)\n\n<br />\n\n### Updating API\n\n- [editMessageText](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#editmessagetext)\n- [editMessageCaption](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#editmessagecaption)\n- [editMessageReplyMarkup](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#editmessagereplymarkup)\n- [deleteMessage](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#deletemessage)\n- [editMessageLiveLocation](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#editmessagelivelocation)\n- [stopMessageLiveLocation](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#stopmessagelivelocation)\n\n<br />\n\n### Group API\n\n- [kickChatMember](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#kickchatmember)\n- [unbanChatMember](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#unbanchatmember)\n- [restrictChatMember](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#restrictchatmember)\n- [promoteChatMember](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#promotechatmember)\n- [exportChatInviteLink](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#exportchatinvitelink)\n- [deleteChatPhoto](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#deletechatphoto)\n- [setChatTitle](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#setchattitle)\n- [setChatDescription](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#setchatdescription)\n- [setChatStickerSet](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#setchatstickerset)\n- [deleteChatStickerSet](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#deletechatstickerset)\n- [pinChatMessage](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#pinchatmessage)\n- [unpinChatMessage](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#unpinchatmessage)\n- [leaveChat](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#leavechat)\n\n<br />\n\n### Payments API\n\n- [sendInvoice](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendinvoice)\n- [answerShippingQuery](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#answershippingquery)\n- [answerPreCheckoutQuery](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#answerprecheckoutquery)\n\n<br />\n\n### Inline mode API\n\n- [answerInlineQuery](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#answerinlinequery)\n\n<br />\n\n### Game API\n\n- [sendGame](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#sendgame)\n- [setGameScore](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#setgamescore)\n- [getGameHighScores](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#getgamehighscores)\n\n<br />\n\n### Others\n\n- [forwardMessage](https://yoctol.github.io/messaging-apis/latest/classes/messaging_api_telegram.telegramclient-1.html#forwardmessage)\n\n<br />\n\n## Debug Tips\n\n### Log Requests Details\n\nTo enable default request debugger, use following `DEBUG` env variable:\n\n```sh\nDEBUG=messaging-api:request\n```\n\nIf you want to use a custom request logging function, just provide your own `onRequest`:\n\n```js\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  onRequest: ({ method, url, headers, body }) => {\n    /* */\n  },\n});\n```\n\n## Testing\n\n### Point Requests to Your Dummy Server\n\nTo avoid sending requests to real Telegram server, specify the `origin` option when constructing your client:\n\n```js\nconst { TelegramClient } = require('messaging-api-telegram');\n\nconst client = new TelegramClient({\n  accessToken: ACCESS_TOKEN,\n  origin: 'https://mydummytestserver.com',\n});\n```\n\n> Warning: Don't do this on your production server.\n","maintainers":[{"email":"chentsulin@gmail.com","name":"chentsulin"},{"email":"et284vu065k3@gmail.com","name":"etrexkuo"},{"email":"tw0517tw@gmail.com","name":"tw0517tw"},{"email":"wtflink515@gmail.com","name":"link515"},{"email":"s92f002@gmail.com","name":"kpman"}],"time":{"modified":"2022-06-19T18:05:13.934Z","created":"2017-07-11T02:44:33.657Z","0.2.2":"2017-07-11T02:44:33.657Z","0.2.3":"2017-07-13T06:35:35.825Z","0.2.4":"2017-08-02T08:15:20.693Z","0.2.7":"2017-08-17T04:25:20.804Z","0.3.0":"2017-08-29T07:36:48.321Z","0.3.3":"2017-09-07T07:49:08.553Z","0.3.4":"2017-09-13T10:14:43.479Z","0.3.5":"2017-09-14T16:15:17.722Z","0.4.1":"2017-09-19T11:17:59.773Z","0.4.2":"2017-09-22T01:43:32.464Z","0.4.3":"2017-09-28T04:54:12.219Z","0.4.4":"2017-10-11T08:03:23.845Z","0.4.6":"2017-10-15T07:59:04.428Z","0.5.0-0":"2017-10-20T06:56:57.556Z","0.5.0":"2017-10-20T07:18:38.298Z","0.5.2":"2017-10-26T04:09:09.584Z","0.5.4":"2017-10-30T05:24:57.797Z","0.5.16":"2017-12-05T07:49:21.481Z","0.6.0":"2017-12-07T04:13:45.798Z","0.6.1":"2017-12-08T15:19:20.085Z","0.6.2":"2017-12-11T10:04:04.791Z","0.6.5":"2017-12-20T03:37:07.084Z","0.6.8":"2017-12-25T04:32:09.239Z","0.7.0-alpha.1":"2018-01-22T06:36:28.819Z","0.7.0-alpha.2":"2018-02-05T02:05:21.318Z","0.6.13":"2018-02-12T08:03:28.415Z","0.7.0-beta.1":"2018-03-26T08:59:26.528Z","0.7.0-beta.2":"2018-03-28T08:08:58.970Z","0.7.0-beta.3":"2018-04-02T06:26:59.451Z","0.7.0-beta.4":"2018-04-03T06:39:58.872Z","0.7.0-beta.5":"2018-04-03T09:39:35.451Z","0.7.0-rc.1":"2018-04-09T08:14:20.691Z","0.7.0-rc.2":"2018-04-17T04:19:55.940Z","0.7.0-rc.3":"2018-04-24T03:52:47.461Z","0.7.0":"2018-04-27T13:30:32.895Z","0.7.2":"2018-06-08T04:11:22.949Z","0.7.3":"2018-06-19T04:00:04.544Z","0.7.4":"2018-07-12T04:15:07.695Z","0.7.5":"2018-08-04T12:20:29.688Z","0.7.6":"2018-08-23T07:10:36.775Z","0.7.7":"2018-09-16T09:13:20.788Z","0.7.8":"2018-09-19T05:58:45.923Z","0.7.11":"2018-10-17T14:50:53.654Z","0.8.0-alpha.1":"2019-01-30T12:27:30.114Z","0.8.0-alpha.2":"2019-02-23T08:20:03.852Z","0.8.0-alpha.3":"2019-03-06T11:03:20.115Z","0.8.0-alpha.4":"2019-03-07T04:31:55.290Z","0.8.0-alpha.5":"2019-03-07T11:01:34.957Z","0.8.0-alpha.6":"2019-03-08T04:22:12.981Z","0.8.0":"2019-08-26T10:06:55.076Z","0.8.1":"2019-08-27T04:07:56.548Z","0.8.2":"2019-09-05T07:16:15.911Z","1.0.0-alpha.0":"2019-09-11T09:45:22.518Z","1.0.0-alpha.2":"2019-10-04T06:35:27.122Z","1.0.0-alpha.3":"2019-10-08T08:19:00.300Z","1.0.0-alpha.6":"2019-11-11T11:41:50.396Z","1.0.0-beta.0":"2019-11-14T07:19:21.142Z","1.0.0-beta.1":"2019-11-16T15:30:24.064Z","1.0.0-beta.2":"2019-11-19T05:54:56.892Z","1.0.0-beta.5":"2019-11-22T14:03:12.119Z","1.0.0-beta.10":"2019-12-09T04:12:12.454Z","1.0.0-beta.16":"2020-04-06T14:32:16.017Z","0.7.17":"2020-04-08T05:14:35.168Z","0.7.18":"2020-04-08T05:21:27.070Z","1.0.0-beta.21":"2020-04-28T06:26:17.424Z","1.0.0-beta.23":"2020-05-18T09:30:42.583Z","1.0.0-beta.24":"2020-06-11T06:37:03.681Z","1.0.0-beta.25":"2020-06-11T11:30:31.145Z","1.0.0-beta.26":"2020-06-16T08:04:59.993Z","1.0.0-beta.27":"2020-06-23T05:48:26.513Z","1.0.0-beta.29":"2020-06-29T04:34:10.916Z","1.0.0-beta.33":"2020-07-22T06:42:06.374Z","1.0.0-beta.34":"2020-09-07T06:19:21.534Z","1.0.0":"2020-09-07T08:54:48.995Z","1.0.1":"2020-09-21T07:05:58.584Z","1.0.4":"2021-01-11T06:05:43.279Z","1.0.6":"2021-09-02T17:33:12.830Z","1.1.0":"2021-10-04T05:54:30.952Z"},"keywords":["bot","chatbot","messaging-apis","telegram"],"repository":{"type":"git","url":"git+https://github.com/Yoctol/messaging-apis.git"},"license":"MIT","readmeFilename":"README.md","users":{"monark789":true,"imark":true},"homepage":"https://github.com/Yoctol/messaging-apis#readme","bugs":{"url":"https://github.com/Yoctol/messaging-apis/issues"}}