-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from topkecleon/develop
Bashbot Version 1.52
- Loading branch information
Showing
84 changed files
with
138 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ USAGE='any_command.sh [-h|--help] [--force|--reference] bot_command args ...' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 30.01.2021 10:24 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 18.12.2020 12:27 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
############ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 27.01.2021 13:42 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
# shellcheck disable=SC2059 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ USAGE='bashbot_stats.sh [-h|--help] [debug]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 23.12.2020 20:34 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
# set bashbot environment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ USAGE='delete_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" [debug]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 03.01.2021 15:37 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ USAGE='send_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" "text|url" ...' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 21.01.2021 08:10 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ USAGE='send_edit_message.sh [-h|--help] [format|caption] "CHAT[ID]" "MESSAGE[ID] | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 23.12.2020 16:52 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ USAGE='kickban_user.sh [-h|--help] [-u|--unban] "CHAT[ID]" "USER[ID]" [debug]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 25.01.2021 20:34 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ USAGE='process_batch.sh [-h|--help] [-s|--startbot] [-w|--watch] [-n|--lines n] | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 27.02.2021 13:14 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ USAGE='process_update.sh [-h|--help] [debug] [<file]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 30.01.2021 19:14 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ USAGE='promote_user.sh [-h|--help] "CHAT[ID]" "USER[ID]" "right[:true|false]" .. | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 25.01.2021 22:34 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ USAGE='broadcast_message.sh [-h|--help] [--doit] [--groups|--both|--db=file] [fo | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 16.12.2020 16:14 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ USAGE='send_message.sh [-h|--help] "CHAT[ID]" "message" "text|url" ...' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 18.01.2021 11:34 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ USAGE='send_dice.sh [-h|--help] "CHAT[ID]" "emoji" [debug]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 07.02.2021 18:45 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ USAGE='send_file.sh [-h|--help] "CHAT[ID]" "file|URL" "caption ...." [type] [deb | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 25.12.2020 20:24 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,15 @@ USAGE='send_message.sh [-h|--help] [format] "CHAT[ID]" "message ...." [debug]' | |
# | ||
# DESCRIPTION: send a message to the given user/group | ||
# | ||
# OPTIONS: format - normal, markdown, html (optional) | ||
# OPTIONS: format - normal, markdown, html, stdin, - (optional) | ||
# CHAT[ID] - ID number of CHAT or BOTADMIN to send to yourself | ||
# message - message to send in specified format | ||
# if no format is givern send_message() format is used | ||
# | ||
# use format "stdin" to read message from stdin or from a file: | ||
# send_message.sh stdin "CHAT[ID]" <file | ||
# df -h | send_message.sh - "CHAT[ID]" | ||
# | ||
# -h - display short help | ||
# --help - this help | ||
# | ||
|
@@ -22,7 +26,7 @@ USAGE='send_message.sh [-h|--help] [format] "CHAT[ID]" "message ...." [debug]' | |
# AUTHOR: KayM (gnadelwartz), [email protected] | ||
# CREATED: 16.12.2020 11:34 | ||
# | ||
#### $$VERSION$$ v1.51-6-g6490f67 | ||
#### $$VERSION$$ v1.52-1-g0dae2db | ||
#=============================================================================== | ||
|
||
#### | ||
|
@@ -41,6 +45,10 @@ case "$1" in | |
SEND="send_html_message" | ||
shift | ||
;; | ||
"stdin"|"-") | ||
FILE="stdin" | ||
shift | ||
;; | ||
esac | ||
|
||
# set bashbot environment | ||
|
@@ -56,7 +64,10 @@ else | |
fi | ||
|
||
# send message in selected format | ||
"${SEND}" "${CHAT}" "$2" | ||
|
||
if [ "${FILE}" = "stdin" ]; then | ||
"${SEND}" "${CHAT}" "$(cat)" | ||
else | ||
"${SEND}" "${CHAT}" "$2" | ||
fi | ||
# output send message result | ||
print_result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.