fix uppercase first letter in command because of auto correction

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-07-20 11:57:40 +02:00
parent 3a658ea1ab
commit c5ce29a586
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@
# #### if you start to develop your own bot, use the clean version of this file:
# #### mycommands.clean
#
#### $$VERSION$$ v0.99-dev2-4-g80b94f4
#### $$VERSION$$ v0.99-dev2-10-g3a658ea
#
# uncomment the following lines to overwrite info and help messages
@ -111,6 +111,8 @@ else
;;&
esac
# fix first letter upper case because of smartphone auto correction
[[ "${MESSAGE}" =~ ^/[[:upper:]] ]] && MESSAGE="${MESSAGE:0:1}$(tr '[:upper:]' '[:lower:]' <<<"${MESSAGE:1:1}")${MESSAGE:2}"
# pre-check admin only commands
case "${MESSAGE}" in
# must be private, group admin, or botadmin