From 91ced1fa35d0b231a3129055f12c4218e7a228af Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 17 Jun 2020 18:36:05 +0200 Subject: [PATCH] add /edited_message example to mycommands.sh --- mycommands.sh | 8 +++++++- mycommands.sh.clean | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mycommands.sh b/mycommands.sh index 120c204..0231663 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -8,7 +8,7 @@ # #### if you start to develop your own bot, use the clean version of this file: # #### mycommands.clean # -#### $$VERSION$$ v0.96-0-g3871ca9 +#### $$VERSION$$ v0.98-dev-33-g18f0ace # # uncomment the following lines to overwrite info and help messages @@ -99,6 +99,12 @@ else send_markdown_message "${CHAT[ID]}" "*${NOTBOTADMIN}*"; return 1 fi ;; + # will we process edited messages also? + '/edited_message'*) + return 1 # no + # but if we do, remove /edited_message + MESSAGE="${MESSAGE#/* }" + ;; esac case "${MESSAGE}" in diff --git a/mycommands.sh.clean b/mycommands.sh.clean index 6fe948e..2d95105 100644 --- a/mycommands.sh.clean +++ b/mycommands.sh.clean @@ -4,7 +4,7 @@ # files: mycommands.sh.clean # copy to mycommands.sh and add all your commands and functions here ... # -#### $$VERSION$$ v0.96-0-g3871ca9 +#### $$VERSION$$ v0.98-dev-33-g18f0ace # ########## @@ -72,7 +72,6 @@ else # a service Message was received # add your own stuff here if [ -n "${SERVICE}" ]; then - # example: delete every service message if [ "${SILENCER}" = "yes" ]; then delete_message "${CHAT[ID]}" "${MESSAGE[ID]}"