mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
113 lines
3.8 KiB
Bash
113 lines
3.8 KiB
Bash
#!/bin/bash
|
|
# shellcheck disable=SC2034
|
|
#######################################################
|
|
#
|
|
# File: mycommands.conf
|
|
#
|
|
# Description: place your config and messages here
|
|
#
|
|
# Usage: will be sourced from mycommands.sh
|
|
#
|
|
# License: WTFPLv2 http://www.wtfpl.net/txt/copying/
|
|
# Author: KayM (gnadelwartz), kay@rrr.de
|
|
# Created: 09.01.2021 07:27
|
|
#
|
|
#### $$VERSION$$ v1.52-1-g0dae2db
|
|
#######################################################
|
|
|
|
##########
|
|
# adjust your language setting here, default is C.UTF-8
|
|
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
|
export 'LC_ALL=C.UTF-8'
|
|
export 'LANG=C.UTF-8'
|
|
export 'LANGUAGE=C.UTF-8'
|
|
|
|
##########
|
|
# in UTF-8 äöü etc. are part of [:alnum:] and ranges (e.g. a-z)
|
|
# for more information see doc/4_expert.md#Character_classes
|
|
# uncomment next line if you want classic ASCII ranges for [a-z] etc.
|
|
#export LC_COLLATE=C
|
|
|
|
|
|
##########
|
|
# edit the following lines to fit your bot usage
|
|
# use ${ME} for current bot name in messages
|
|
# Note: you must escape '_' in botname with two \ in markdown messages!
|
|
|
|
# output of /info command
|
|
export bashbot_info='This is @'"${ME//_/\\\\_}"', the Telegram example bot written entirely in bash.
|
|
Edit commands and messages in mycommands.sh!
|
|
'
|
|
|
|
# output of /help command (uncomment the next 2 lines
|
|
# export bashbot_help='*Available commands*:
|
|
# '
|
|
|
|
# Set INLINE to 1 in order to receive inline queries.
|
|
# To enable this option in your bot, send the /setinline command to @BotFather.
|
|
export INLINE="0"
|
|
|
|
# Set CALLBACK to 1 in order to receive callback queries.
|
|
# callbacks are sent from inline_keyboards (buttons) attached tp bot messages
|
|
export CALLBACK="0"
|
|
|
|
# if your bot is group admin it get commands sent to other bots
|
|
# Set MEONLY to 1 to ignore commands sent to other bots
|
|
export MEONLY="0"
|
|
|
|
# Set to .* to allow sending files from all locations
|
|
# NOTE: this is a regex, not shell globbing! you must use a valid egex,
|
|
# '.' matches any character and '.*' matches all remaining charatcers!
|
|
# additionally you must escape special characters with '\', e.g. '\. \? \[ \*" to match them literally
|
|
export FILE_REGEX="${BASHBOT_ETC}/.*"
|
|
|
|
# set BASHBOT_RETRY to enable retry in case of recoverable errors, e.g. throtteling
|
|
# problems with send_xxx message etc are looged to logs/ERROR.log
|
|
unset BASHBOT_RETRY
|
|
#export BASHBOT_RETRY="yes"
|
|
|
|
# set value for adaptive sleeping while waiting for uodates in millisconds
|
|
# max slepp between polling updates 10s (default 5s)
|
|
# export BASHBOT_SLEEP="10000"
|
|
|
|
# max slepp between polling updates 2s (default 5s)
|
|
# export BASHBOT_SLEEP="2000"
|
|
|
|
# add 0.2s if no update available, up to BASHBOT_SLEEP (default 0.1s)
|
|
export BASHBOT_SLEEP_STEP="200"
|
|
|
|
# if you want to use timer functions, set BASHBOT_START_TIMER to a not empty value
|
|
# default is to not start timer
|
|
unset BASHBOT_START_TIMER
|
|
#export BASHBOT_START_TIMER="yes"
|
|
|
|
# set to "yes" and give your bot admin privilegs to remove service messages from groups
|
|
export SILENCER="no"
|
|
|
|
# uncomment to remove keyboards sent from your bot
|
|
# export REMOVEKEYBOARD="yes"
|
|
# export REMOVEKEYBOARD_PRIVATE="yes"
|
|
|
|
# uncomment to say welcome to new chat members
|
|
# export WELCOME_NEWMEMBER="yes"
|
|
WELCOME_MSG="Welcome"
|
|
|
|
# uncomment to be informed about new/left chat members
|
|
# export REPORT_NEWMEMBER="yes"
|
|
# export REPORT_LEFTMEMBER="yes"
|
|
|
|
# uncomment to send user blocked by bot a warning if they send commands
|
|
# export NOTIFY_BLOCKED_USERS="yes"
|
|
|
|
# messages for admin only commands
|
|
NOTADMIN="Sorry, this command is allowed for admin or owner only"
|
|
NOTBOTADMIN="Sorry, this command is allowed for bot owner only"
|
|
|
|
########
|
|
# special network setup may require additional ARGS to curl
|
|
#
|
|
# example: run bashbot over TOR or SOCKS proxy
|
|
# export BASHBOT_CURL_ARGS="--socks5-hostname 127.0.0.1:9050" # TOR
|
|
# export BASHBOT_CURL_ARGS="--socks5-hostname 127.0.0.1" # regular SOCKS
|
|
|