Only allow /help in private

This commit is contained in:
Michael De Roover 2021-05-08 18:45:04 +02:00
parent f592d7a8da
commit 03f23fa514
Signed by: vim
GPG Key ID: 075496E232CE04CB

View File

@ -79,23 +79,28 @@ debug(){
# Public commands
help(){
sendmsg "Hiya! I'm <a href=\"https://t.me/ghnou\">ghnou</a>'s personal bot, Konata.
if [ $(jq -r '.message.chat.type' <<< $input) == "private" ]
then
sendmsg "Hiya! I'm <a href=\"https://t.me/ghnou\">ghnou</a>'s personal bot, Konata.
<b>Currently I have the following features:</b>
- /help - Show this help message.
- /alive - Check whether I'm running.
- /cv [country] - Check COVID-19 stats.
- /id - Get the current chat's ID.
- /ud [term] - Get a definition from Urban Dictionary.
- /konata - Get one of my selfies :3
- /konachan [query] - Get a picture from Konachan.
- /4c [board] - Get a random image from 4chan.
- /lfy [query] - Let me look that up for you...
- /ip [address] - Get information for an IP address.
- /wttr [city] - Get the weather for a city.
- /repo - Get my source code.
<b>Currently I have the following features:</b>
- /help - Show this help message.
- /alive - Check whether I'm running.
- /cv [country] - Check COVID-19 stats.
- /id - Get the current chat's ID.
- /ud [term] - Get a definition from Urban Dictionary.
- /konata - Get one of my selfies :3
- /konachan [query] - Get a picture from Konachan.
- /4c [board] - Get a random image from 4chan.
- /lfy [query] - Let me look that up for you...
- /ip [address] - Get information for an IP address.
- /wttr [city] - Get the weather for a city.
- /repo - Get my source code.
And a lot more to come!"
And a lot more to come!"
else
sendmsg "Please ask me in <a href=\"https://t.me/$bot\">private</a>!"
fi
}
alive(){