TGBOT Class
物件TGBOT
Constructor
TGBOT
(
-
options
Parameters:
-
optionsObject選項
Item Index
Methods
Methods
addCmd
(
-
cmd -
script -
desc -
helpMsg
添加指令
Parameters:
-
cmdString指令名稱
-
scriptFunction指令的內容
-
descString簡短描述
-
helpMsgString說明文字
createToolBox
(
Object
-
message
建構toolBox物件
Parameters:
-
messageObject訊息
Returns:
Object:
toolBox 工具盒 sendToChat(text) 發送文字到訊息的來源 replyMsg(text) 以文字回復訊息 sendToUser(text) 發送文字給發送訊息的使用者
genHelp
(
String
-
Help的格式
產生Help
Parameters:
-
Help的格式Function
Returns:
String:
help help
getMe
(
-
cb
獲取bot資訊
Parameters:
-
cbFunctioncallback
sendMessage
(
-
chat_id -
text -
[datas]
發送訊息
Parameters:
-
chat_idObject要送到哪
-
textString要發送的文字
-
[datas]Object optional其他資料
start
()
啟動bot
