add more argument to do more
This commit is contained in:
6
bot.sh
6
bot.sh
@ -5,17 +5,17 @@ user=$2
|
|||||||
|
|
||||||
# 傳送訊息
|
# 傳送訊息
|
||||||
function sendMessage {
|
function sendMessage {
|
||||||
curl "https://api.telegram.org/bot$token/sendMessage?chat_id=$user&text=$1"
|
curl "https://api.telegram.org/bot$token/sendMessage?chat_id=$user&text=$1$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 傳送照片
|
# 傳送照片
|
||||||
function sendPhoto {
|
function sendPhoto {
|
||||||
curl "https://api.telegram.org/bot$token/sendPhoto?chat_id=$user&photo=$1&caption=$2"
|
curl "https://api.telegram.org/bot$token/sendPhoto?chat_id=$user&photo=$1&caption=$2$3"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 傳送貼圖
|
# 傳送貼圖
|
||||||
function sendSticker {
|
function sendSticker {
|
||||||
curl "https://api.telegram.org/bot$token/sendSticker?chat_id=$user&sticker=$1"
|
curl "https://api.telegram.org/bot$token/sendSticker?chat_id=$user&sticker=$1$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 主程式
|
# 主程式
|
||||||
|
Reference in New Issue
Block a user