mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-05-30 08:50:51 +00:00
use MarkdownV2
This commit is contained in:
parent
c86efb1e07
commit
a055b775d7
|
@ -181,8 +181,8 @@ It features background tasks and interactive chats, and can serve as an interfac
|
|||
<p>A powerful tool to improve your scripts is <code>shellcheck</code>. You can <a href="https://www.shellcheck.net/">use it online</a> or <a href="https://github.com/koalaman/shellcheck#installing">install shellcheck locally</a>. Shellcheck is used extensive in bashbot development to enshure a high code quality, e.g. it's not allowed to push changes without passing all shellcheck tests. In addition bashbot has a <a href="doc/7_develop.md">test suite</a> to check if important functionality is working as expected.</p>
|
||||
<h3>Do not use #!/usr/bin/env bash</h3>
|
||||
<p><strong>We stay with /bin/bash shebang, because it's more save from security perspective.</strong></p>
|
||||
<p>Using the system provided bash makes it harder for attackers or users to place alternative versions of bash and avoids using possibly broken, mangled or compromised bash executables.</p>
|
||||
<p>If you are a MacOS user or forced to use an alternative bash, see <a href="doc/0_install.md">Install Bashbot</a></p>
|
||||
<p>Using a fixed path to the system provided bash makes it harder for attackers or users to place alternative versions of bash and avoids using a possibly broken, mangled or compromised bash executable.</p>
|
||||
<p>If you are a BSD / MacOS user or must to use an other bash location, see <a href="doc/0_install.md">Install Bashbot</a></p>
|
||||
<h3>Run your Bot as a restricted user</h3>
|
||||
<p><strong>I recommend to run your bot as a user, with almost no access rights.</strong> All files your Bot have write access to are in danger to be overwritten/deleted if your bot is hacked. For the same reason ervery file your Bot can read is in danger to be disclosed. Restict your Bots access rigths to the absolute minimum.</p>
|
||||
<p><strong>Never run your Bot as root, this is the most dangerous you can do!</strong> Usually the user 'nobody' has almost no rights on Unix/Linux systems. See <a href="doc/4_expert.md">Expert use</a> on how to run your Bot as an other user.</p>
|
||||
|
@ -228,6 +228,6 @@ It features background tasks and interactive chats, and can serve as an interfac
|
|||
<p>@Gnadelwartz</p>
|
||||
<h2>That's it!</h2>
|
||||
<p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p>
|
||||
<h4>$$VERSION$$ V0.94-8-g876361f</h4>
|
||||
<h4>$$VERSION$$ V0.94-9-g46af634</h4>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -192,4 +192,4 @@ This may happen if to many wrong requests are sent to api.telegram.org, e.g. usi
|
|||
|
||||
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
|
||||
|
||||
#### $$VERSION$$ V0.94-8-g876361f
|
||||
#### $$VERSION$$ V0.94-9-g46af634
|
||||
|
|
12
README.txt
12
README.txt
|
@ -160,12 +160,12 @@ functionality is working as expected.
|
|||
**We stay with /bin/bash shebang, because it's more save from security
|
||||
perspective.**
|
||||
|
||||
Using the system provided bash makes it harder for attackers or users to place
|
||||
alternative versions of bash and avoids using
|
||||
possibly broken, mangled or compromised bash executables.
|
||||
Using a fixed path to the system provided bash makes it harder for attackers or
|
||||
users to place alternative versions of bash
|
||||
and avoids using a possibly broken, mangled or compromised bash executable.
|
||||
|
||||
If you are a MacOS user or forced to use an alternative bash, see [Install
|
||||
Bashbot](doc/0_install.md)
|
||||
If you are a BSD / MacOS user or must to use an other bash location, see
|
||||
[Install Bashbot](doc/0_install.md)
|
||||
|
||||
### Run your Bot as a restricted user
|
||||
**I recommend to run your bot as a user, with almost no access rights.**
|
||||
|
@ -270,4 +270,4 @@ tor proxy on your server you may uncomment the ```BASHBOT_CURL_ARGS``` line in
|
|||
If you feel that there's something missing or if you found a bug, feel free to
|
||||
submit a pull request!
|
||||
|
||||
#### $$VERSION$$ V0.94-8-g876361f
|
||||
#### $$VERSION$$ V0.94-9-g46af634
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ V0.94-0-gbdb50c8
|
||||
#### $$VERSION$$ v0.96-dev-0-gc86efb1
|
||||
|
||||
# source once magic, function named like file
|
||||
eval "$(basename "${BASH_SOURCE[0]}")(){ :; }"
|
||||
|
@ -35,7 +35,7 @@ send_normal_message() {
|
|||
send_markdown_message() {
|
||||
local text; text="$(JsonEscape "${2}")"
|
||||
until [ -z "${text}" ]; do
|
||||
sendJson "${1}" '"text":"'"${text:0:4096}"'","parse_mode":"markdown"' "${MSG_URL}"
|
||||
sendJson "${1}" '"text":"'"${text:0:4096}"'","parse_mode":"markdownv2"' "${MSG_URL}"
|
||||
text="${text:4096}"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user