mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-29 13:12:36 +00:00
Fixed last bugs
This commit is contained in:
parent
79a7a7ee4a
commit
a7801823ce
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# bashbot, the Telegram bot written in bash.
|
# bashbot, the Telegram bot written in bash.
|
||||||
# Written by @topkecleon, Juan Potato (@awkward_potato), Lorenzo Santina (BigNerd95) and Daniil Gentili (danog)
|
# Written by @topkecleon, Juan Potato (@awkward_potato), Lorenzo Santina (BigNerd95) and Daniil Gentili (@danog)
|
||||||
# https://github.com/topkecleon/telegram-bot-bash
|
# https://github.com/topkecleon/telegram-bot-bash
|
||||||
|
|
||||||
# Depends on ./JSON.sh (http://github.com/dominictarr/./JSON.sh),
|
# Depends on ./JSON.sh (http://github.com/dominictarr/./JSON.sh),
|
||||||
@ -51,7 +51,7 @@ send_message() {
|
|||||||
local sent=y
|
local sent=y
|
||||||
fi
|
fi
|
||||||
if [ "$file" != "" ]; then
|
if [ "$file" != "" ]; then
|
||||||
send_file "$chat" "$file"
|
send_file "$chat" "$file" "$text"
|
||||||
local sent=y
|
local sent=y
|
||||||
fi
|
fi
|
||||||
if [ "$lat" != "" -a "$long" != "" ]; then
|
if [ "$lat" != "" -a "$long" != "" ]; then
|
||||||
@ -232,7 +232,7 @@ Contribute to the project: https://github.com/topkecleon/telegram-bot-bash
|
|||||||
else
|
else
|
||||||
case $MESSAGE in
|
case $MESSAGE in
|
||||||
'/cancel')
|
'/cancel')
|
||||||
kill $copid
|
tmux kill-session -t $copname
|
||||||
rm -r $copname
|
rm -r $copname
|
||||||
send_message "${USER[ID]}" "Command canceled."
|
send_message "${USER[ID]}" "Command canceled."
|
||||||
;;
|
;;
|
||||||
@ -241,7 +241,8 @@ Contribute to the project: https://github.com/topkecleon/telegram-bot-bash
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
while true; do {
|
# source the script with source as param to use functions in other scripts
|
||||||
|
while [ "$1" != "source" ]; do {
|
||||||
|
|
||||||
res=$(curl -s $UPD_URL$OFFSET | ./JSON.sh -s)
|
res=$(curl -s $UPD_URL$OFFSET | ./JSON.sh -s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user