-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
2,364 additions
and
2,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,70 @@ | ||
# TODO generate heroku app.json from sample | ||
# Telegram Bot API Token, obtain it here: https://t.me/BotFather. This is the only required configuration variable. | ||
TG_BOT_TOKEN="166849652:AAEPCgHuDf3K6HvI2OkrJmDN2k9R6mcfmLs" | ||
TG_BOT_TOKEN="166849652:AAEPCgHuDf3K6HvI2OkrJmDN2k9Rexample" | ||
# TODO | ||
#TG_BOT_API="https://api.telegram.org" | ||
#TG_BOT_API="http://127.0.0.1:8081" | ||
# Chat ID of bot owner for alerts and permissions | ||
TG_BOT_OWNER_CHAT_ID="1265343" | ||
|
||
# TODO | ||
CHAT_STORAGE="/home/gpchelkin/scdlbot.pickle" | ||
# (Absolute?) path to parent directory for downloads directories, default: /tmp/scdlbot | ||
DL_DIR="/tmp/scdlbot" | ||
|
||
# TODO | ||
BIN_PATH="" | ||
# TODO | ||
WORKERS="2" | ||
# Download timeout in seconds, stop downloading if it takes longer than allowed | ||
DL_TIMEOUT="300" | ||
|
||
# TODO | ||
CHECK_URL_TIMEOUT="30" | ||
# TODO | ||
COMMON_CONNECTION_TIMEOUT="10" | ||
# Telegram upload file size limit (in bytes). API limit is 50 MB, Local mode API limit is 2000 MB (so you can change it to 1900_000_000). | ||
MAX_TG_FILE_SIZE = "45_000_000" | ||
# Bot will not try to split and send files bigger than this (in bytes) | ||
MAX_CONVERT_FILE_SIZE="80_000_000" | ||
# Comma-separated chat IDs with no replying and caption spam | ||
NO_FLOOD_CHAT_IDS="-10018859218,-1011068201" | ||
|
||
ALERT_CHAT_IDS="1265343,3265143" | ||
|
||
BIN_PATH="" | ||
|
||
CHAT_STORAGE="/home/gpchelkin/scdlbotdata" | ||
|
||
# For using inline mode bot needs to store audios somewhere. ID of that chat. | ||
STORE_CHAT_ID="-1795100" | ||
|
||
# HTTP or local path with cookies file for Instagram and/or Yandex.Music | ||
COOKIES_FILE="https://example.com/cookies.txt" | ||
# TODO | ||
PROXIES="http://127.0.0.1:3187,http://127.0.0.1:3188," | ||
# TODO | ||
SOURCE_IPS="9.21.18.2,9.21.16.9" | ||
# A space separated list of domains which should be considered whitelisted - the bot will only process these domains. Example of domain: example.com if the domain has a subdomain this needs to be included: subdomain.example.com **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
WHITELIST_DOMAINS="example.com,subdomain.example.com" | ||
# A space separated list of domains which should be considered blacklisted - the bot will not process these domains. Example of domain: example.com if the domain has a subdomain this needs to be included: subdomain.example.com **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
BLACKLIST_DOMAINS="example.com,subdomain.example.com" | ||
#BLACKLIST_DOMAINS="invidious.tube,invidious.kavin.rocks,invidious.himiko.cloud,invidious.namazso.eu,dev.viewtube.io,tube.cadence.moe,piped.kavin.rocks" | ||
A space separated list of chat_ids which should be considered whitelisted - the bot will only join those chats **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
WHITELIST_CHATS ="-1795100, 1795102" | ||
WHITELIST_CHATS ="-1795100,1795102" | ||
# A space separated list of chat_ids which should be considered blacklisted - the bot will not join those chats. **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
BLACKLIST_CHATS ="-1795100, 1795102" | ||
|
||
SOURCE_IPS="9.21.18.2,9.21.16.9" | ||
PROXIES="socks5://127.0.0.1:1080,socks5://127.0.0.1:1081," | ||
SERVE_AUDIO="0" | ||
# Host and port for metrics | ||
METRICS_HOST="127.0.0.1" | ||
METRICS_PORT="8000" | ||
|
||
# HTTP or local path with cookies file for Yandex.Music | ||
COOKIES_FILE="http://test.test.com/cookies.txt" | ||
|
||
# Don't try to split and send files over this number of bytes | ||
MAX_CONVERT_FILE_SIZE="80_000_000" | ||
|
||
# Telegram upload file size limit | ||
MAX_TG_FILE_SIZE = "45_000_000" | ||
#MAX_TG_FILE_SIZE = "1900_000_000" | ||
|
||
#Hostname to show in Syslog messages. In most cases it is already set in environment, you may want to use it on Heroku. | ||
HOSTNAME="prod-aws" | ||
|
||
# Syslog server, for example: logsX.papertrailapp.com:55555 | ||
SYSLOG_ADDRESS="logs2.papertrailapp.com:51181" | ||
|
||
# Set to 1 to enable verbose debug logging | ||
SYSLOG_DEBUG="0" | ||
|
||
|
||
# Webhooks: These links should help. In NGINX use TG_BOT_TOKEN without ":" symbol instead of TOKEN1, and port in proxy_pass according to PORT environment variable. | ||
# https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks#using-nginx-with-one-domainport-for-all-bots | ||
# https://nginx.org/en/linux_packages.html#mainline | ||
# https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx | ||
BLACKLIST_CHATS ="-1795100,1795102" | ||
|
||
### Webhook: | ||
# Use webhook for bot updates: 1, use polling (default): 0, more info https://core.telegram.org/bots/api#getting-updates | ||
USE_WEBHOOK="0" | ||
|
||
WEBHOOK_ENABLE="0" | ||
# Host and port for webhook to listen to; Heroku sets PORT automatically for web dynos, so you shouldn't set it for Heroku | ||
HOST="0.0.0.0" | ||
PORT="5000" | ||
|
||
# Your host URL like https://scdlbot.herokuapp.com/, required for webhook mode | ||
APP_URL="https://yourapp.heroku.com/" | ||
|
||
# A space separated list of domains which should be considered whitelisted - the bot will only process these domains. Example of domain: example.com if the domain has a subdomain this needs to be included: subdomain.example.com **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
WHITELIST_DOMS="example.com subdomain.example.com" | ||
# A space separated list of domains which should be considered blacklisted - the bot will not process these domains. Example of domain: example.com if the domain has a subdomain this needs to be included: subdomain.example.com **NOTE** that if both whitelist and blacklist will be used, only the blacklist will be taken into consideration. | ||
BLACKLIST_DOMS="example.com subdomain.example.com" | ||
# Your host URL like https://scdlbot.herokuapp.com, required for webhook mode | ||
WEBHOOK_APP_URL_ROOT="https://yourapp.heroku.com" | ||
# Your URL path for webhook to listen | ||
URL_PATH="166849652AAEPCgHuDf3K6HvI2OkrJmDN2k9R6mcfmLs" | ||
|
||
# Amount of threads in the thread pool for functions decorated with @run_async: | ||
# https://docs.python-telegram-bot.org/en/stable/telegram.ext.updater.html | ||
WORKERS=4 | ||
WEBHOOK_APP_URL_PATH="166849652AAEPCgHuDf3K6HvI2OkrJmDN2k9Rexample" | ||
# TODO | ||
WEBHOOK_SECRET_TOKEN="CHANGEME" | ||
# These links should help. In NGINX use WEBHOOK_APP_URL_PATH (TG_BOT_TOKEN without ":"), and port in proxy_pass according to PORT environment variable. | ||
# https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks#using-nginx-with-one-domainport-for-all-bots | ||
|
||
# Variables for some specific deployments, you don't need it: | ||
#LC_ALL="en_US.UTF8" | ||
#PYENV_VERSION="3.8.2" | ||
### Monitoring and logging: | ||
# Host and port for metrics in Prometheus OpenMetrics format: | ||
METRICS_HOST="127.0.0.1" | ||
METRICS_PORT="8000" | ||
# Set to DEBUG to enable verbose debug logging | ||
LOGLEVEL="INFO" | ||
# Syslog server, for example: logsX.papertrailapp.com:55555 | ||
SYSLOG_ADDRESS="logs2.papertrailapp.com:51181" | ||
# Hostname to show in Syslog messages. In most cases it is already set in environment, you may want to set it manually in Heroku. | ||
HOSTNAME="prod-aws" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ Contributors | |
------------ | ||
|
||
* Leonid Runyshkin @leovp | ||
* Vadim Larionov @vadimlarionov <[email protected]> | ||
* Vadim Larionov @vadimlarionov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.