From c14eb6ae7c514aed183874e934fcfbf3bbdcdce9 Mon Sep 17 00:00:00 2001 From: kalanakt Date: Tue, 9 Jan 2024 20:51:40 +0530 Subject: [PATCH] fix: e[#126] && d[#111] --- .env.example | 4 ++ .gitignore | 3 + .idea/.gitignore | 3 + .idea/All-Url-Uploader.iml | 15 +++++ .idea/inspectionProfiles/Project_Default.xml | 43 ++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++ .idea/misc.xml | 10 ++++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 ++ All-Url-Uploader.session | Bin 0 -> 28672 bytes Uploader/README.md | 37 ------------ Uploader/button.py | 9 +-- Uploader/callbacks.py | 9 +-- Uploader/commands.py | 7 --- Uploader/dl_button.py | 6 +- Uploader/echo.py | 11 +--- Uploader/functions/help_ytdl.py | 7 ++- Uploader/thumbunali.py | 5 +- Uploader/youtube.py | 55 ++++++++---------- app.json | 12 ---- app.py | 2 + bot.py | 26 ++++++--- Uploader/config.py => config.py | 25 +++----- log.txt | 18 ++++++ requirements.txt | 18 +----- sample_config.py | 50 ---------------- 26 files changed, 183 insertions(+), 212 deletions(-) create mode 100644 .env.example create mode 100644 .idea/.gitignore create mode 100644 .idea/All-Url-Uploader.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 All-Url-Uploader.session delete mode 100644 Uploader/README.md rename Uploader/config.py => config.py (68%) create mode 100644 log.txt delete mode 100644 sample_config.py diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..d1f2e667 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +BOT_TOKEN= +API_ID= +API_HASH= +OWNER_ID= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4bdcd6bf..e95794e1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ yarn-error.log* .env.test.local .env.production.local .env + +*.session +*.session-journal diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/All-Url-Uploader.iml b/.idea/All-Url-Uploader.iml new file mode 100644 index 00000000..f35a5644 --- /dev/null +++ b/.idea/All-Url-Uploader.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..cb0bc9cb --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,43 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..85b31a76 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..457c187d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/All-Url-Uploader.session b/All-Url-Uploader.session new file mode 100644 index 0000000000000000000000000000000000000000..1fcb5639871411f802c8a2a4a54546ad5af7e366 GIT binary patch literal 28672 zcmeI(du&rx90%}wd;6fJqfQ>zIcg4&v6dl5!7YF&-FiE#rGu_>Ad=ekUbnlg5Br!9 zBFNa7iUcr&{i88~KMaW&4T?x2k0=^hKr@Nr1A>ug3=zdm#0SyS`v~1+3I7@3d(!*p zdHl{fpWFU%*0cI00XZv?Cz9!SG)rbPw=gWrEF^?sm?`wI&_hoSdSlez&?{STKicgS zW>)K`MYPm1c0c2oSoB-bj-tnkjP_UPTOWM!X7U*EyO2Ebkg^)mGk+up7jk9ENzD)>vV`d9KmuJ^;azd0=%Hm3GhN+fh zLW(4E@g^y)49%iV&>!>)OKF&^RV4a6h^w%@`w^3wznf<>Bl^f?q;w)0mz4PCQR3^B z3S#S7Zm-eIm+|cK5piWviD()nA|<#oPFZv>;mmw#DZ4rwZEBY~=;M`>3GHIkpQ@)i zAP_Cn=2ARW8{L>J4*3^(Ld(d*!ZMq?(`m5qJkNHOC_$CsC?{@MKqX5HM@Lndv`1GM zcBay8G!~OGnMg}C(~_^R)lqUag@Y8a-Z=W0-5ETUQI11X@_ zj8d{zXE={UzqRqCC=FMO=CUo3Hfa?h)q%QdHA4QItpe$t{1;K}VptDyCeoD5<{N6+ zHg|q)&W`(mp)Vu|KmY;|fB*y_009U<00Izz!1XTBImu*YxG`OJqsh9WXYld5ny+6U znEq4A!9&jR?Z&2IPK(emo?P0t$SPS zGIPzmwp;KN`1p7)lxW?$ZEyldZ^t&M-34$eF{?)Fu^1NUB-n2Ni+U!7aC_`ctd zo$Q->%r3nw-pR0wBofK5{|%1ajN>#tAwd8F5P$##AOHafKmY;|fB*y_@c#=`^q%WI z6tOVo@l}j*V9n;fOSjI=(qHtWVn;L)lXB_yT&g`86{R%Iq-*@?le@m({Ru}KOyn8k z_Ad|1PTx>>euqVyoXAz?Ybd|}JN{FAQ ? -
-

How to edit config.py

- -

Here is sample edited config.py for deploy to Locally/VPS. copy and past and edit with your variables

-

Go To sample_config.py and edit with your veriable

- -
-# sample config file 
-
-class Config(object):
-
-    # get a token from @BotFather
-    BOT_TOKEN = "5568340867:AAGuPzlgwqgHtgqmdL7yt12PRLrXFjt98Zg"
-    
-    # Get these values from my.telegram.org
-    API_ID = 12345
-    API_HASH = "uPzlgwqgHtgqmdL7yt12PRLrXFj"
-    
-    # No need to change
-    DOWNLOAD_LOCATION = "./DOWNLOADS"
-    ADL_BOT_RQ = {}
-    CHUNK_SIZE = 128
-    TG_MAX_FILE_SIZE = 4194304000
-    HTTP_PROXY = ""
-    PROCESS_MAX_TIMEOUT = 3700
-    
-    # TG Ids
-    LOG_CHANNEL = -1001798969594
-    OWNER_ID = 1288398723
-    
-    # bot username without @
-    BOT_USERNAME = "AdvanceUrlUploaderBot"
-    
-    # auth users
-    AUTH_USERS = [OWNER_ID, 1288398722, 1288398724, 1288398725]
-
diff --git a/Uploader/button.py b/Uploader/button.py index 80f98a14..9f42d16f 100644 --- a/Uploader/button.py +++ b/Uploader/button.py @@ -25,17 +25,10 @@ import time import shutil import asyncio -import logging -import subprocess - -from pyrogram.types import * from datetime import datetime from Uploader.utitles import * -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config from Uploader.script import Translation from Uploader.functions.ran_text import random_char from Uploader.functions.display_progress import progress_for_pyrogram, humanbytes diff --git a/Uploader/callbacks.py b/Uploader/callbacks.py index 1719c580..c8d2a651 100644 --- a/Uploader/callbacks.py +++ b/Uploader/callbacks.py @@ -20,17 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE -import os -from Uploader.functions.display_progress import progress_for_pyrogram, humanbytes -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config from Uploader.dl_button import ddl_call_back from Uploader.button import youtube_dl_call_back from Uploader.script import Translation -from pyrogram import Client, types -from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton +from pyrogram import Client import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') diff --git a/Uploader/commands.py b/Uploader/commands.py index 72bcac18..89990409 100644 --- a/Uploader/commands.py +++ b/Uploader/commands.py @@ -20,17 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE -import os - from pyrogram import Client, filters from pyrogram.types import Message from Uploader.script import Translation -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config - @Client.on_message( filters.command("start") & filters.private, diff --git a/Uploader/dl_button.py b/Uploader/dl_button.py index aded19aa..003ee121 100644 --- a/Uploader/dl_button.py +++ b/Uploader/dl_button.py @@ -24,17 +24,13 @@ import time import aiohttp import asyncio -import logging from datetime import datetime from Uploader.functions.display_progress import progress_for_pyrogram, humanbytes, TimeFormatter from Uploader.utitles import * from Uploader.script import Translation -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') diff --git a/Uploader/echo.py b/Uploader/echo.py index 2461f040..e3e8d505 100644 --- a/Uploader/echo.py +++ b/Uploader/echo.py @@ -20,34 +20,25 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE -import os import time import json import asyncio import logging -from opencc import OpenCC - from pyrogram.types import Thumbnail from pyrogram import Client, filters from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config from Uploader.script import Translation from Uploader.functions.ran_text import random_char from Uploader.functions.display_progress import humanbytes -from Uploader.functions.display_progress import humanbytes logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) logging.getLogger("pyrogram").setLevel(logging.WARNING) -s2tw = OpenCC('s2tw.json').convert - @Client.on_message(filters.private & filters.regex(pattern=".*http.*")) async def echo(bot, update): diff --git a/Uploader/functions/help_ytdl.py b/Uploader/functions/help_ytdl.py index b5f1c3aa..849e3e5a 100644 --- a/Uploader/functions/help_ytdl.py +++ b/Uploader/functions/help_ytdl.py @@ -21,8 +21,6 @@ # SOFTWARE import os -import time -import requests import logging from urllib.parse import urlparse @@ -39,6 +37,9 @@ def get_file_extension_from_url(url): def get_resolution(info_dict): + width = 0 + height = 0 + if {"width", "height"} <= info_dict.keys(): width = int(info_dict['width']) height = int(info_dict['height']) @@ -58,4 +59,4 @@ def get_resolution(info_dict): elif info_dict['height'] == 240: width = 426 height = 240 - return (width, height) + return width, height diff --git a/Uploader/thumbunali.py b/Uploader/thumbunali.py index 86cb6504..28fbf709 100644 --- a/Uploader/thumbunali.py +++ b/Uploader/thumbunali.py @@ -24,10 +24,7 @@ from pyrogram import Client, filters -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config @Client.on_message(filters.photo & filters.incoming & filters.private) diff --git a/Uploader/youtube.py b/Uploader/youtube.py index d1f65039..031362b2 100644 --- a/Uploader/youtube.py +++ b/Uploader/youtube.py @@ -21,25 +21,18 @@ # SOFTWARE import os -from urllib.parse import urlparse -import wget import asyncio -from opencc import OpenCC from youtube_dl import YoutubeDL -from pyrogram import Client, filters, enums +from pyrogram import enums from pyrogram.types import Message from pyrogram import Client, filters -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config from Uploader.functions.help_ytdl import get_file_extension_from_url, get_resolution -YTDL_REGEX = (r"^((?:https?:)?\/\/)") -s2tw = OpenCC('s2tw.json').convert +YTDL_REGEX = r"^((?:https?:)?\/\/)" @Client.on_callback_query(filters.regex("^ytdl_audio$")) @@ -84,16 +77,35 @@ async def send_audio(message: Message, info_dict, audio_file): thumb = download_location if os.path.isfile( download_location) else None webpage_url = info_dict['webpage_url'] - title = s2tw(info_dict['title']) + title = info_dict['title'] or '' caption = f'{title}' duration = int(float(info_dict['duration'])) - performer = s2tw(info_dict['uploader']) + performer = info_dict['uploader'] or '' await message.reply_audio(audio_file, caption=caption, duration=duration, performer=performer, title=title, parse_mode=enums.ParseMode.HTML, thumb=thumb) os.remove(audio_file) os.remove(thumbnail_file) +async def send_video(message: Message, info_dict, video_file): + basename = video_file.rsplit(".", 1)[-2] + thumbnail_url = info_dict['thumbnail'] + thumbnail_file = f"{basename}.{get_file_extension_from_url(thumbnail_url)}" + download_location = f"{Config.DOWNLOAD_LOCATION}/{message.from_user.id}.jpg" + thumb = download_location if os.path.isfile( + download_location) else None + webpage_url = info_dict['webpage_url'] + title = info_dict['title'] or '' + caption = f'{title}' + duration = int(float(info_dict['duration'])) + width, height = get_resolution(info_dict) + await message.reply_video(video_file, caption=caption, duration=duration, width=width, height=height, + parse_mode=enums.ParseMode.HTML, thumb=thumb) + + os.remove(video_file) + os.remove(thumbnail_file) + + @Client.on_callback_query(filters.regex("^ytdl_video$")) async def callback_query_ytdl_video(_, callback_query): try: @@ -123,21 +135,4 @@ async def callback_query_ytdl_video(_, callback_query): except Exception as e: await message.reply_text(e) await callback_query.message.reply_to_message.delete() - await callback_query.message.delete() - - async def send_video(message: Message, info_dict, video_file): - basename = video_file.rsplit(".", 1)[-2] - thumbnail_url = info_dict['thumbnail'] - thumbnail_file = f"{basename}.{get_file_extension_from_url(thumbnail_url)}" - download_location = f"{Config.DOWNLOAD_LOCATION}/{message.from_user.id}.jpg" - thumb = download_location if os.path.isfile( - download_location) else None - webpage_url = info_dict['webpage_url'] - title = s2tw(info_dict['title']) - caption = f'{title}' - duration = int(float(info_dict['duration'])) - width, height = get_resolution(info_dict) - await message.reply_video(video_file, caption=caption, duration=duration, width=width, height=height, parse_mode=enums.ParseMode.HTML, thumb=thumb) - - os.remove(video_file) - os.remove(thumbnail_file) + await callback_query.message.delete() \ No newline at end of file diff --git a/app.json b/app.json index e92c3d0d..35059adc 100644 --- a/app.json +++ b/app.json @@ -15,10 +15,6 @@ "website": "kalanakt.github.io/projects/telegram/all-url-uploader ", "repository": "https://github.com/kalanakt/All-Url-Uploader", "env": { - "WEBHOOK": { - "description": "Don't Need To change - Setting this to True when in env mode", - "value": "True" - }, "BOT_TOKEN": { "description": "Your bot token, as a string.", "value": "" @@ -31,17 +27,9 @@ "description": "Get this value from https://my.telegram.org", "value": "" }, - "LOG_CHANNEL": { - "description": "Your Any Own Private Channel ID Where Your Bot As Admin With Full Permission", - "value": "" - }, "OWNER_ID": { "description": "Your Telegram ID For Broadcast", "value": "12345678" - }, - "BOT_USERNAME": { - "description": "Your Bot Username Without @", - "value": "" } }, "addons": [ diff --git a/app.py b/app.py index cb89d57b..78fa71aa 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,8 @@ from flask import Flask + app = Flask(__name__) + @app.route('/') def hello_world(): return 'Hello from Koyeb' diff --git a/bot.py b/bot.py index c483aeb7..9f616b20 100644 --- a/bot.py +++ b/bot.py @@ -25,11 +25,7 @@ from pyrogram.raw.all import layer from pyrogram import Client, idle, __version__ - -if bool(os.environ.get("WEBHOOK")): - from Uploader.config import Config -else: - from sample_config import Config +from config import Config logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') @@ -38,7 +34,20 @@ logging.getLogger("pyrogram").setLevel(logging.WARNING) if not os.path.isdir(Config.DOWNLOAD_LOCATION): - os.makedirs(Config.DOWNLOAD_LOCATION) + os.makedirs(Config.DOWNLOAD_LOCATION) + +if not Config.BOT_TOKEN: + logger.error("Please set BOT_TOKEN in config.py or as env var") + quit(1) + +if not Config.API_ID: + logger.error("Please set API_ID in config.py or as env var") + quit(1) + +if not Config.API_HASH: + logger.error("Please set API_HASH in config.py or as env var") + quit(1) + bot = Client( 'All-Url-Uploader', @@ -50,6 +59,9 @@ ) bot.start() +logger.info("Bot has started.") +logger.info(f"**Bot Started**\n\n**Pyrogram Version:** `{__version__}`\n**Layer:** `{layer}`") +logger.info("Developed by github.com/kalanakt Sponsored by www.netronk.com") idle() bot.stop() -logger.info("Bot Stoped ;)") +logger.info("Bot Stopped ;)") diff --git a/Uploader/config.py b/config.py similarity index 68% rename from Uploader/config.py rename to config.py index e97d8fce..cb9fe22d 100644 --- a/Uploader/config.py +++ b/config.py @@ -21,7 +21,7 @@ # SOFTWARE import os - +from dotenv import load_dotenv import logging logging.basicConfig( @@ -31,13 +31,14 @@ level=logging.INFO ) +load_dotenv() + class Config(object): - WEBHOOK = os.environ.get("BOT_TOKEN", False) # Get a token from @BotFather - BOT_TOKEN = os.environ.get("BOT_TOKEN", "") + BOT_TOKEN = os.environ.get("BOT_TOKEN") # The Telegram API things - API_ID = int(os.environ.get("API_ID", 12345)) + API_ID = os.environ.get("API_ID") API_HASH = os.environ.get("API_HASH") # Get these values from my.telegram.org # Array to store users who are authorized to use the bot @@ -45,28 +46,20 @@ class Config(object): # File /video download location DOWNLOAD_LOCATION = "./DOWNLOADS" - MEGA_EMAIL = os.environ.get("MEGA_EMAIL", "None") - # If deploying on vps edit the above value as example := Mega_email = "Your-Mega_email-inside-inverted-commas." - - # This is not necessary! Enter your mega password only if you have a mega.nz account with pro/business features. - MEGA_PASSWORD = os.environ.get("MEGA_PASSWORD", "None") - # If deploying on vps edit the above value as example := Mega_password = "Your-Mega_password-inside-inverted-commas." # Telegram maximum file upload size TG_MAX_FILE_SIZE = 4194304000 - # Chunk size that should be used with requests + # Chunk size that should be used with requests : default is 128KB CHUNK_SIZE = int(os.environ.get("CHUNK_SIZE", 128)) # Proxy for accessing youtube-dl in GeoRestricted Areas # Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061 HTTP_PROXY = os.environ.get("HTTP_PROXY", "") - # Set timeout for subprcess + # Set timeout for subprocess PROCESS_MAX_TIMEOUT = 3700 - LOG_CHANNEL = int(os.environ.get("LOG_CHANNEL", -100)) - OWNER_ID = int(os.environ.get("OWNER_ID", "12356")) - BOT_USERNAME = os.environ.get("BOT_USERNAME", "") + OWNER_ID = os.environ.get("OWNER_ID") ADL_BOT_RQ = {} AUTH_USERS = list({int(x) - for x in os.environ.get("AUTH_USERS", "0").split()}) + for x in os.environ.get("AUTH_USERS", "0").split()}) AUTH_USERS.append(OWNER_ID) diff --git a/log.txt b/log.txt new file mode 100644 index 00000000..4a7f064a --- /dev/null +++ b/log.txt @@ -0,0 +1,18 @@ +__main__ - ERROR - Please set BOT_TOKEN in config.py or as env var +__main__ - ERROR - Please set BOT_TOKEN in config.py or as env var +__main__ - INFO - Bot has started. +__main__ - INFO - **Bot Started** + +**Pyrogram Version:** `2.0.106` +**Layer:** `158` +__main__ - INFO - Developed by github.com/kalanakt Sponsored by www.netronk.com +root - INFO - Stop signal received (SIGINT). Exiting... +__main__ - INFO - Bot Stopped ;) +__main__ - INFO - Bot has started. +__main__ - INFO - **Bot Started** + +**Pyrogram Version:** `2.0.106` +**Layer:** `158` +__main__ - INFO - Developed by github.com/kalanakt Sponsored by www.netronk.com +root - INFO - Stop signal received (SIGINT). Exiting... +__main__ - INFO - Bot Stopped ;) diff --git a/requirements.txt b/requirements.txt index 54de003e..2e503ca7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,26 +1,14 @@ aiohttp -beautifulsoup4 hachoir -numpy Pillow -pyrogram==2.0.43 +pyrogram requests tgcrypto -olefile -motor -pymongo -dnspython -psutil +python-dotenv loggers -filetype -tldextract -aiofiles -pyromod yt-dlp -filesplit==4.0.0 -mega.py -opencc wget youtube_dl Flask==2.3.2 gunicorn==20.1.0 +sent diff --git a/sample_config.py b/sample_config.py deleted file mode 100644 index 0341554d..00000000 --- a/sample_config.py +++ /dev/null @@ -1,50 +0,0 @@ -# MIT License - -# Copyright (c) 2022 Hash Minner - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE - -# edit this file with your veriable if you'r deploy bot via locally | vps - -class Config(object): - - # get a token from @BotFather - BOT_TOKEN = "" - - # Get these values from my.telegram.org - API_ID = 1234567 - API_HASH = "" - - # No need to change - DOWNLOAD_LOCATION = "./DOWNLOADS" - ADL_BOT_RQ = {} - CHUNK_SIZE = 128 - TG_MAX_FILE_SIZE = 4194304000 - HTTP_PROXY = "" - PROCESS_MAX_TIMEOUT = 3700 - - # TG Ids - LOG_CHANNEL = -1007119867241 - OWNER_ID = 1288398723 - - # bot username without @ - BOT_USERNAME = "AdvanceUrlUploaderBot" - - # auth users - AUTH_USERS = [OWNER_ID]