🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More
Socket
Book a DemoInstallSign in
Socket

google-apps-script-telegram-bot-library

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-apps-script-telegram-bot-library

you can use this library to develop your tgbot on google apps script

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

Google Apps Script Telegram Bot Library

一個 TGbot lib
讓你可以在 Google Apps Script 上輕鬆寫 Telegram bot
或者你也可以 npm install 後在 local 端開發

Imgur Imgur

npm install

npm i google-apps-script-telegram-bot-library

Google Apps Script Library install

打開 gs 編輯頁面
-> "資源"
-> "程式庫"
-> 將 1XyHWbpiDtyHFEcZ0AOlsJp8DL99ax2R9HvehtjYg3vlLK4DDbiPyZ9eI 貼上輸入框
-> "新增"
-> 選擇最後版本(記得阿 不然儲存不了)
-> "儲存"~

Open Script Editor.
-> Resource
-> Library
-> Paste Script ID 1XyHWbpiDtyHFEcZ0AOlsJp8DL99ax2R9HvehtjYg3vlLK4DDbiPyZ9eI to box
-> Add library
-> select lastest version and save

Run on NodeJs

const tgbot = require('google-apps-script-telegram-bot-library')
var bot = new tgbot.tgbot("<botToken>")
var result = bot.sendMessage({"chat_id":"123","text":"030"})
console.log(result);

Run on Google Apps Script

var tgbot = new TGbot.tgbot("<botToken>");
var result = tgbot.sendMessage({"chat_id":"123","text":"030"})
console.log(result);

Unit test

所有method皆測試過可用,除了以下名單沒測

未測試名單(not use unit test)

名稱name原因reason
setChatStickerSet因為人數未達100人
deleteChatStickerSet因為人數未達100人
Telegram Passport作者不知道原理:(
Games作者不會寫遊戲:(

Additional method

這個 library 還有一些特有的 method 可以用

getPath

獲取檔案的下載路徑

ParameterstypeRequiredDescription
file_idstringYesFile identifier to get info about

getFileDownloadUrl

獲取檔案的下載連結

ParameterstypeRequiredDescription
PathstringYesgetPath回傳的結果

Keywords

telegram

FAQs

Package last updated on 22 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts