diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 000000000..93811c252 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "super_V8" ] + pull_request: + branches: [ "super_V8" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/info.py b/info.py index a755ecef7..09e8c5a5e 100644 --- a/info.py +++ b/info.py @@ -11,18 +11,18 @@ def is_enabled(value, default): return default # Bot information -SESSION = environ.get('SESSION', 'Media_search') -API_ID = int(environ['API_ID']) -API_HASH = environ['API_HASH'] -BOT_TOKEN = environ['BOT_TOKEN'] +SESSION = environ.get('SESSION', 'Virus_Botz') +API_ID = int(environ['22549633']) +API_HASH = environ['34d8c9887fe445c1dac2228cbdf9ab48'] +BOT_TOKEN = environ['6052565020:AAGSj-s7O0FJUKe9zc6cWdnhmNJkavu15Is'] # Bot settings CACHE_TIME = int(environ.get('CACHE_TIME', 300)) USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False)) -PICS = (environ.get('PICS', 'https://telegra.ph/file/7e56d907542396289fee4.jpg https://telegra.ph/file/9aa8dd372f4739fe02d85.jpg https://telegra.ph/file/adffc5ce502f5578e2806.jpg https://telegra.ph/file/6937b60bc2617597b92fd.jpg https://telegra.ph/file/09a7abaab340143f9c7e7.jpg https://telegra.ph/file/5a82c4a59bd04d415af1c.jpg https://telegra.ph/file/323986d3bd9c4c1b3cb26.jpg https://telegra.ph/file/b8a82dcb89fb296f92ca0.jpg https://telegra.ph/file/31adab039a85ed88e22b0.jpg https://telegra.ph/file/c0e0f4c3ed53ac8438f34.jpg https://telegra.ph/file/eede835fb3c37e07c9cee.jpg https://telegra.ph/file/e17d2d068f71a9867d554.jpg https://telegra.ph/file/8fb1ae7d995e8735a7c25.jpg https://telegra.ph/file/8fed19586b4aa019ec215.jpg https://telegra.ph/file/8e6c923abd6139083e1de.jpg https://telegra.ph/file/0049d801d29e83d68b001.jpg')).split() +PICS = (environ.get('PICS','https://telegra.ph/file/c0c88578bf2a3636ac860.jpg')).split() # Admins, Channels & Users -ADMINS = [int(admin) if id_pattern.search(admin) else admin for admin in environ.get('ADMINS', '').split()] +ADMINS = [int(admin) if id_pattern.search(admin) else admin for admin in environ.get('ADMINS', '2057170163').split()] CHANNELS = [int(ch) if id_pattern.search(ch) else ch for ch in environ.get('CHANNELS', '0').split()] auth_users = [int(user) if id_pattern.search(user) else user for user in environ.get('AUTH_USERS', '').split()] AUTH_USERS = (auth_users + ADMINS) if auth_users else [] @@ -146,4 +146,4 @@ def is_enabled(value, default): # Thank you LazyDeveloper for helping us in this Journey # 🥰 Thank you for giving me credit @LazyDeveloperr 🥰 # for any error please contact me -> telegram@LazyDeveloperr or insta @LazyDeveloperr -# rip paid developers 🤣 - >> No need to buy paid source code while @LazyDeveloperr is here 😍😍 \ No newline at end of file +# rip paid developers 🤣 - >> No need to buy paid source code while @LazyDeveloperr is here 😍😍 diff --git a/sample_info.py b/sample_info.py index c44208438..c38672f8e 100644 --- a/sample_info.py +++ b/sample_info.py @@ -1,9 +1,9 @@ -# Bot information -SESSION = 'Media_search' +## Bot information +SESSION = 'Virus_Botz' USER_SESSION = 'User_Bot' -API_ID = 12345 -API_HASH = '0123456789abcdef0123456789abcdef' -BOT_TOKEN = '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' +API_ID = 22549633 +API_HASH = '34d8c9887fe445c1dac2228cbdf9ab48' +BOT_TOKEN = '6052565020:AAGSj-s7O0FJUKe9zc6cWdnhmNJkavu15Is' USERBOT_STRING_SESSION = '' # Bot settings @@ -11,14 +11,16 @@ USE_CAPTION_FILTER = False # Admins, Channels & Users -ADMINS = [12345789, 'admin123', 98765432] -CHANNELS = [-10012345678, -100987654321, 'channelusername'] -AUTH_USERS = [] +ADMINS = 2057170163 +CHANNELS = -1001402115130 +AUTH_USERS = 2057170163 AUTH_CHANNEL = None # MongoDB information -DATABASE_URI = "mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb]?retryWrites=true&w=majority" +DATABASE_URI = "mongodb+srv://virus07:@cluster0.aexnusr.mongodb.net/?retryWrites=true&w=majority" DATABASE_NAME = 'Telegram' -COLLECTION_NAME = 'channel_files' # If you are using the same database, then use different collection name for each bot +COLLECTION_NAME = 'telegram_files' # If you are using the same database, then use different collection name for each bot + +