├── Procfile ├── runtime.txt ├── start ├── ShrutiMusic ├── assets │ ├── Corbert W00 Heavy.ttf │ ├── font.ttf │ ├── upic.png │ ├── font2.ttf │ ├── font3.ttf │ ├── shruti.png │ ├── welcome.png │ ├── Nand_Yadu1c.png │ ├── ShrutiBots.jpg │ ├── play_icons.png │ └── shuffle_icon.png ├── utils │ ├── couple.py │ ├── decorators │ │ ├── __init__.py │ │ └── language.py │ ├── exceptions.py │ ├── database │ │ ├── __init__.py │ │ └── assistantdatabase.py │ ├── inline │ │ ├── __init__.py │ │ ├── extras.py │ │ ├── speed.py │ │ ├── stats.py │ │ ├── queue.py │ │ ├── start.py │ │ └── settings.py │ ├── __init__.py │ ├── sys.py │ ├── stream │ │ ├── autoclear.py │ │ └── queue.py │ ├── extraction.py │ ├── pastebin.py │ ├── keyboard.py │ ├── channelplay.py │ ├── logger.py │ ├── error.py │ └── inlinequery.py ├── platforms │ ├── __init__.py │ ├── Soundcloud.py │ ├── Resso.py │ ├── Apple.py │ ├── Carbon.py │ └── Spotify.py ├── plugins │ ├── misc │ │ ├── watcher.py │ │ ├── seeker.py │ │ └── autoleave.py │ ├── __init__.py │ ├── admins │ │ ├── stop.py │ │ ├── resume.py │ │ ├── pause.py │ │ ├── shuffle.py │ │ ├── loop.py │ │ ├── seek.py │ │ └── auth.py │ ├── tools │ │ ├── markdown.py │ │ ├── ping.py │ │ ├── tts.py │ │ ├── bots.py │ │ ├── mongochk.py │ │ ├── speedtest.py │ │ ├── tiny.py │ │ ├── td.py │ │ ├── downloadrepo.py │ │ ├── language.py │ │ ├── fun.py │ │ ├── active.py │ │ ├── telegraph.py │ │ └── invitelink.py │ ├── sudo │ │ ├── logger.py │ │ ├── maintenance.py │ │ ├── autoend.py │ │ ├── blchat.py │ │ └── block.py │ ├── bot │ │ ├── privacy.py │ │ └── inline.py │ └── play │ │ ├── playmode.py │ │ ├── channel.py │ │ └── live.py ├── core │ ├── mongo.py │ ├── dir.py │ ├── bot.py │ └── git.py ├── logging.py ├── __init__.py └── misc.py ├── heroku.yml ├── .env ├── Dockerfile ├── SECURITY.md ├── requirements.txt ├── .github ├── workflows │ └── notify-forks.yml └── dependabot.yml ├── render.yaml ├── strings └── __init__.py ├── config.py ├── .gitignore ├── setup └── app.json /Procfile: -------------------------------------------------------------------------------- 1 | worker: bash start 2 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.11.4 2 | -------------------------------------------------------------------------------- /start: -------------------------------------------------------------------------------- 1 | python3 -m ShrutiMusic 2 | -------------------------------------------------------------------------------- /ShrutiMusic/assets/Corbert W00 Heavy.ttf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | worker: Dockerfile 4 | run: 5 | worker: bash start -------------------------------------------------------------------------------- /ShrutiMusic/assets/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/font.ttf -------------------------------------------------------------------------------- /ShrutiMusic/assets/upic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/upic.png -------------------------------------------------------------------------------- /ShrutiMusic/assets/font2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/font2.ttf -------------------------------------------------------------------------------- /ShrutiMusic/assets/font3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/font3.ttf -------------------------------------------------------------------------------- /ShrutiMusic/assets/shruti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/shruti.png -------------------------------------------------------------------------------- /ShrutiMusic/assets/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/welcome.png -------------------------------------------------------------------------------- /ShrutiMusic/assets/Nand_Yadu1c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/Nand_Yadu1c.png -------------------------------------------------------------------------------- /ShrutiMusic/assets/ShrutiBots.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/ShrutiBots.jpg -------------------------------------------------------------------------------- /ShrutiMusic/assets/play_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/play_icons.png -------------------------------------------------------------------------------- /ShrutiMusic/assets/shuffle_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoxxOP/ShrutiMusic/HEAD/ShrutiMusic/assets/shuffle_icon.png -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | API_ID= 2 | API_HASH= 3 | BOT_TOKEN= 4 | OWNER_ID= 5 | BOT_USERNAME= 6 | MONGO_DB_URI= 7 | LOG_GROUP_ID= 8 | GIT_TOKEN= 9 | SUPPORT_CHANNEL= 10 | SUPPORT_GROUP= 11 | INSTAGRAM= 12 | YOUTUBE= 13 | GITHUB= 14 | DONATE= 15 | START_IMG_URL= 16 | STRING_SESSION= 17 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nikolaik/python-nodejs:python3.10-nodejs19 2 | 3 | RUN sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \ 4 | sed -i '/security.debian.org/d' /etc/apt/sources.list && \ 5 | apt-get update && \ 6 | apt-get install -y --no-install-recommends ffmpeg && \ 7 | apt-get clean && \ 8 | rm -rf /var/lib/apt/lists/* 9 | 10 | COPY . /app/ 11 | WORKDIR /app/ 12 | RUN pip3 install --no-cache-dir -U -r requirements.txt 13 | 14 | CMD bash start 15 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/couple.py: -------------------------------------------------------------------------------- 1 | coupledb = {} 2 | 3 | 4 | async def _get_lovers(cid: int): 5 | chat_data = coupledb.get(cid, {}) 6 | lovers = chat_data.get("couple", {}) 7 | return lovers 8 | 9 | 10 | async def get_image(cid: int): 11 | chat_data = coupledb.get(cid, {}) 12 | image = chat_data.get("img", "") 13 | return image 14 | 15 | 16 | async def get_couple(cid: int, date: str): 17 | lovers = await _get_lovers(cid) 18 | return lovers.get(date, False) 19 | 20 | 21 | async def save_couple(cid: int, date: str, couple: dict, img: str): 22 | if cid not in coupledb: 23 | coupledb[cid] = {"couple": {}, "img": ""} 24 | coupledb[cid]["couple"][date] = couple 25 | coupledb[cid]["img"] = img 26 | 27 | 28 | # ❤️ Love From ShrutiBots 29 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pyrofork 2 | gTTS 3 | aiofiles 4 | aiohttp 5 | asyncio 6 | beautifulsoup4 7 | dnspython 8 | ffmpeg-python 9 | gitpython 10 | hachoir 11 | heroku3 12 | httpx 13 | motor 14 | numpy 15 | opencv-python 16 | pytz 17 | pillow==9.5.0 18 | psutil 19 | py-tgcalls==0.9.7 20 | pykeyboard 21 | kurigram==2.1.35 22 | python-dotenv 23 | pyyaml 24 | requests 25 | speedtest-cli 26 | spotipy 27 | tgcrypto 28 | telegraph 29 | unidecode 30 | youtube-search 31 | youtube-search-python 32 | py-yt-search 33 | yt-dlp 34 | # =========================================== 35 | # ©️ 2025 Nand Yaduwanshi , aka @NoxxOP 36 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 37 | # 📢 Telegram Channel : https://t.me/ShrutiBots 38 | # =========================================== 39 | 40 | -------------------------------------------------------------------------------- /.github/workflows/notify-forks.yml: -------------------------------------------------------------------------------- 1 | name: Notify Forks About Update 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | notify: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Notify forks via issue 13 | run: | 14 | echo "Checking forked repos for update notification..." 15 | 16 | curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ 17 | https://api.github.com/repos/NoxxOP/ShrutiMusic/forks \ 18 | | jq -r '.[].full_name' \ 19 | | while read repo; do 20 | echo "Creating issue in fork: $repo" 21 | curl -X POST \ 22 | -H "Authorization: token ${{ secrets.PERSONAL_TOKEN }}" \ 23 | -H "Accept: application/vnd.github.v3+json" \ 24 | https://api.github.com/repos/$repo/issues \ 25 | -d "{\"title\": \"🔄 New Update Available\", \"body\": \"Your fork of [ShrutiMusic](https://github.com/NoxxOP/ShrutiMusic) is behind. Please merge the latest changes from the upstream repo.\n\nThanks! 🙌\"}" 26 | done 27 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/decorators/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from .admins import * 24 | from .language import * 25 | 26 | 27 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 28 | 29 | # =========================================== 30 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 31 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 32 | # 📢 Telegram Channel : https://t.me/ShrutiBots 33 | # =========================================== 34 | 35 | 36 | # ❤️ Love From ShrutiBots 37 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/exceptions.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | class AssistantErr(Exception): 24 | def __init__(self, errr: str): 25 | super().__init__(errr) 26 | 27 | 28 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 29 | 30 | # =========================================== 31 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 32 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 33 | # 📢 Telegram Channel : https://t.me/ShrutiBots 34 | # =========================================== 35 | 36 | 37 | # ❤️ Love From ShrutiBots 38 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/database/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from .assistantdatabase import * 24 | from .memorydatabase import * 25 | from .mongodatabase import * 26 | from .database import * 27 | 28 | 29 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 30 | 31 | # =========================================== 32 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 33 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 34 | # 📢 Telegram Channel : https://t.me/ShrutiBots 35 | # =========================================== 36 | 37 | 38 | # ❤️ Love From ShrutiBots 39 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from .extras import * 24 | from .help import * 25 | from .play import * 26 | from .queue import * 27 | from .settings import * 28 | from .speed import * 29 | from .start import * 30 | 31 | 32 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 33 | 34 | # =========================================== 35 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 36 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 37 | # 📢 Telegram Channel : https://t.me/ShrutiBots 38 | # =========================================== 39 | 40 | 41 | # ❤️ Love From ShrutiBots 42 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from .Apple import AppleAPI 24 | from .Carbon import CarbonAPI 25 | from .Resso import RessoAPI 26 | from .Soundcloud import SoundAPI 27 | from .Spotify import SpotifyAPI 28 | from .Telegram import TeleAPI 29 | from .Youtube import YouTubeAPI 30 | 31 | 32 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 33 | 34 | # =========================================== 35 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 36 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 37 | # 📢 Telegram Channel : https://t.me/ShrutiBots 38 | # =========================================== 39 | 40 | 41 | # ❤️ Love From ShrutiBots 42 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from .channelplay import * 24 | from .database import * 25 | from .decorators import * 26 | from .extraction import * 27 | from .formatters import * 28 | from .inline import * 29 | from .pastebin import * 30 | from .sys import * 31 | from .error import * 32 | from .couple import * 33 | 34 | 35 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 36 | 37 | # =========================================== 38 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 39 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 40 | # 📢 Telegram Channel : https://t.me/ShrutiBots 41 | # =========================================== 42 | 43 | 44 | # ❤️ Love From ShrutiBots 45 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/misc/watcher.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.core.call import Nand 28 | 29 | welcome = 20 30 | close = 30 31 | 32 | 33 | @app.on_message(filters.video_chat_started, group=welcome) 34 | @app.on_message(filters.video_chat_ended, group=close) 35 | async def welcome(_, message: Message): 36 | await Nand.stop_stream_force(message.chat.id) 37 | 38 | 39 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 40 | 41 | # =========================================== 42 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 43 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 44 | # 📢 Telegram Channel : https://t.me/ShrutiBots 45 | # =========================================== 46 | 47 | 48 | # ❤️ Love From ShrutiBots 49 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/sys.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import time 24 | 25 | import psutil 26 | 27 | from ShrutiMusic.misc import _boot_ 28 | from ShrutiMusic.utils.formatters import get_readable_time 29 | 30 | 31 | async def bot_sys_stats(): 32 | bot_uptime = int(time.time() - _boot_) 33 | UP = f"{get_readable_time(bot_uptime)}" 34 | CPU = f"{psutil.cpu_percent(interval=0.5)}%" 35 | RAM = f"{psutil.virtual_memory().percent}%" 36 | DISK = f"{psutil.disk_usage('/').percent}%" 37 | return UP, CPU, RAM, DISK 38 | 39 | 40 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 41 | 42 | # =========================================== 43 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 44 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 45 | # 📢 Telegram Channel : https://t.me/ShrutiBots 46 | # =========================================== 47 | 48 | 49 | # ❤️ Love From ShrutiBots 50 | -------------------------------------------------------------------------------- /ShrutiMusic/core/mongo.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from motor.motor_asyncio import AsyncIOMotorClient 24 | 25 | from config import MONGO_DB_URI 26 | 27 | from ..logging import LOGGER 28 | 29 | LOGGER(__name__).info("Connecting to your Mongo Database...") 30 | try: 31 | _mongo_async_ = AsyncIOMotorClient(MONGO_DB_URI) 32 | mongodb = _mongo_async_.Yukki 33 | LOGGER(__name__).info("Connected to your Mongo Database.") 34 | except: 35 | LOGGER(__name__).error("Failed to connect to your Mongo Database.") 36 | exit() 37 | 38 | 39 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 40 | 41 | # =========================================== 42 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 43 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 44 | # 📢 Telegram Channel : https://t.me/ShrutiBots 45 | # =========================================== 46 | 47 | 48 | # ❤️ Love From ShrutiBots 49 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/stream/autoclear.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | 25 | from config import autoclean 26 | 27 | 28 | async def auto_clean(popped): 29 | try: 30 | rem = popped["file"] 31 | autoclean.remove(rem) 32 | count = autoclean.count(rem) 33 | if count == 0: 34 | if "vid_" not in rem or "live_" not in rem or "index_" not in rem: 35 | try: 36 | os.remove(rem) 37 | except: 38 | pass 39 | except: 40 | pass 41 | 42 | 43 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 44 | 45 | # =========================================== 46 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 47 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 48 | # 📢 Telegram Channel : https://t.me/ShrutiBots 49 | # =========================================== 50 | 51 | 52 | # ❤️ Love From ShrutiBots 53 | -------------------------------------------------------------------------------- /ShrutiMusic/core/dir.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | 25 | from ..logging import LOGGER 26 | 27 | 28 | def dirr(): 29 | for file in os.listdir(): 30 | if file.endswith(".jpg"): 31 | os.remove(file) 32 | elif file.endswith(".jpeg"): 33 | os.remove(file) 34 | elif file.endswith(".png"): 35 | os.remove(file) 36 | 37 | if "downloads" not in os.listdir(): 38 | os.mkdir("downloads") 39 | if "cache" not in os.listdir(): 40 | os.mkdir("cache") 41 | 42 | LOGGER(__name__).info("Directories Updated.") 43 | 44 | 45 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 46 | 47 | # =========================================== 48 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 49 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 50 | # 📢 Telegram Channel : https://t.me/ShrutiBots 51 | # =========================================== 52 | 53 | 54 | # ❤️ Love From ShrutiBots 55 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import glob 24 | from os.path import dirname, isfile 25 | 26 | 27 | def __list_all_modules(): 28 | work_dir = dirname(__file__) 29 | mod_paths = glob.glob(work_dir + "/*/*.py") 30 | 31 | all_modules = [ 32 | (((f.replace(work_dir, "")).replace("/", "."))[:-3]) 33 | for f in mod_paths 34 | if isfile(f) and f.endswith(".py") and not f.endswith("__init__.py") 35 | ] 36 | 37 | return all_modules 38 | 39 | 40 | ALL_MODULES = sorted(__list_all_modules()) 41 | __all__ = ALL_MODULES + ["ALL_MODULES"] 42 | 43 | 44 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 45 | 46 | # =========================================== 47 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 48 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 49 | # 📢 Telegram Channel : https://t.me/ShrutiBots 50 | # =========================================== 51 | 52 | 53 | # ❤️ Love From ShrutiBots 54 | -------------------------------------------------------------------------------- /ShrutiMusic/logging.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import logging 24 | 25 | logging.basicConfig( 26 | level=logging.INFO, 27 | format="[%(asctime)s - %(levelname)s] - %(name)s - %(message)s", 28 | datefmt="%d-%b-%y %H:%M:%S", 29 | handlers=[ 30 | logging.FileHandler("log.txt"), 31 | logging.StreamHandler(), 32 | ], 33 | ) 34 | 35 | logging.getLogger("httpx").setLevel(logging.ERROR) 36 | logging.getLogger("pyrogram").setLevel(logging.ERROR) 37 | logging.getLogger("pytgcalls").setLevel(logging.ERROR) 38 | 39 | 40 | def LOGGER(name: str) -> logging.Logger: 41 | return logging.getLogger(name) 42 | 43 | 44 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 45 | 46 | # =========================================== 47 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 48 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 49 | # 📢 Telegram Channel : https://t.me/ShrutiBots 50 | # =========================================== 51 | 52 | 53 | # ❤️ Love From ShrutiBots 54 | -------------------------------------------------------------------------------- /ShrutiMusic/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from ShrutiMusic.core.bot import Nand 24 | from ShrutiMusic.core.dir import dirr 25 | from ShrutiMusic.core.git import git 26 | from ShrutiMusic.core.userbot import Userbot 27 | from ShrutiMusic.misc import dbb, heroku 28 | 29 | from .logging import LOGGER 30 | 31 | dirr() 32 | git() 33 | dbb() 34 | heroku() 35 | 36 | app = Nand() 37 | userbot = Userbot() 38 | 39 | 40 | from .platforms import * 41 | 42 | Apple = AppleAPI() 43 | Carbon = CarbonAPI() 44 | SoundCloud = SoundAPI() 45 | Spotify = SpotifyAPI() 46 | Resso = RessoAPI() 47 | Telegram = TeleAPI() 48 | YouTube = YouTubeAPI() 49 | 50 | 51 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 52 | 53 | # =========================================== 54 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 55 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 56 | # 📢 Telegram Channel : https://t.me/ShrutiBots 57 | # =========================================== 58 | 59 | 60 | # ❤️ Love From ShrutiBots 61 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/extraction.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.enums import MessageEntityType 24 | from pyrogram.types import Message, User 25 | 26 | from ShrutiMusic import app 27 | 28 | 29 | async def extract_user(m: Message) -> User: 30 | if m.reply_to_message: 31 | return m.reply_to_message.from_user 32 | msg_entities = m.entities[1] if m.text.startswith("/") else m.entities[0] 33 | return await app.get_users( 34 | msg_entities.user.id 35 | if msg_entities.type == MessageEntityType.TEXT_MENTION 36 | else int(m.command[1]) 37 | if m.command[1].isdecimal() 38 | else m.command[1] 39 | ) 40 | 41 | 42 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 43 | 44 | # =========================================== 45 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 46 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 47 | # 📢 Telegram Channel : https://t.me/ShrutiBots 48 | # =========================================== 49 | 50 | 51 | # ❤️ Love From ShrutiBots 52 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/pastebin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import aiohttp 24 | 25 | BASE = "https://batbin.me/" 26 | 27 | 28 | async def post(url: str, *args, **kwargs): 29 | async with aiohttp.ClientSession() as session: 30 | async with session.post(url, *args, **kwargs) as resp: 31 | try: 32 | data = await resp.json() 33 | except Exception: 34 | data = await resp.text() 35 | return data 36 | 37 | 38 | async def NandBin(text): 39 | resp = await post(f"{BASE}api/v2/paste", data=text) 40 | if not resp["success"]: 41 | return 42 | link = BASE + resp["message"] 43 | return link 44 | 45 | 46 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 47 | 48 | # =========================================== 49 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 50 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 51 | # 📢 Telegram Channel : https://t.me/ShrutiBots 52 | # =========================================== 53 | 54 | 55 | # ❤️ Love From ShrutiBots 56 | -------------------------------------------------------------------------------- /render.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | - type: web 3 | name: shruti-music 4 | env: python 5 | region: oregon 6 | plan: free 7 | buildCommand: | 8 | apt-get update && apt-get install -y ffmpeg 9 | pip install -r requirements.txt 10 | startCommand: python3 -m ShrutiMusic 11 | autoDeploy: true 12 | 13 | envVars: 14 | API_ID: 15 | value: 29448785 16 | API_HASH: 17 | value: 599574f6aff0a09ebb76305b58e7e9c2 18 | API_KEY: 19 | sync: false 20 | BOT_TOKEN: 21 | sync: false 22 | MONGO_DB_URI: 23 | value: mongodb+srv://pusers:nycreation@nycreation.pd4klp1.mongodb.net/?retryWrites=true&w=majority&appName=NYCREATION 24 | OWNER_ID: 25 | value: 7574330905 26 | OWNER_USERNAME: 27 | value: WTF_WhyMeeh 28 | BOT_USERNAME: 29 | value: ShrutixMusicBot 30 | UPSTREAM_REPO: 31 | value: https://github.com/NoxxOP/ShrutiMusic 32 | STRING_SESSION: 33 | sync: false 34 | GIT_TOKEN: 35 | sync: false 36 | HEROKU_API_KEY: 37 | sync: false 38 | HEROKU_APP_NAME: 39 | sync: false 40 | LOG_GROUP_ID: 41 | value: -1002321189618 42 | SUPPORT_GROUP: 43 | value: https://t.me/ShrutiBotsupport 44 | SUPPORT_CHANNEL: 45 | value: https://t.me/ShrutiBots 46 | INSTAGRAM: 47 | value: https://instagram.com/yaduwanshi_nand 48 | YOUTUBE: 49 | value: https://youtube.com/@NandEditz 50 | GITHUB: 51 | value: https://github.com/NoxxOP 52 | DONATE: 53 | value: https://t.me/ShrutiBots/91 54 | START_IMG_URL: 55 | sync: false 56 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | # Python packages 9 | - package-ecosystem: "pip" 10 | directory: "/" 11 | schedule: 12 | interval: "weekly" 13 | open-pull-requests-limit: 10 14 | target-branch: "main" 15 | labels: 16 | - "dependencies" 17 | - "python" 18 | assignees: 19 | - "NoxxOP" 20 | reviewers: 21 | - "NoxxOP" 22 | commit-message: 23 | prefix: "pip" 24 | include: "scope" 25 | 26 | # Check for updates to GitHub Actions 27 | - package-ecosystem: "github-actions" 28 | directory: "/" 29 | schedule: 30 | interval: "weekly" 31 | open-pull-requests-limit: 5 32 | labels: 33 | - "dependencies" 34 | - "github-actions" 35 | assignees: 36 | - "NoxxOP" 37 | reviewers: 38 | - "NoxxOP" 39 | commit-message: 40 | prefix: "github-actions" 41 | include: "scope" 42 | 43 | # Check for docker dependencies 44 | - package-ecosystem: "docker" 45 | directory: "/" 46 | schedule: 47 | interval: "weekly" 48 | open-pull-requests-limit: 5 49 | labels: 50 | - "dependencies" 51 | - "docker" 52 | assignees: 53 | - "NoxxOP" 54 | reviewers: 55 | - "NoxxOP" 56 | commit-message: 57 | prefix: "docker" 58 | include: "scope" 59 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/keyboard.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pykeyboard import InlineKeyboard 24 | from pyrogram.types import InlineKeyboardButton as Ikb 25 | 26 | from .functions import get_urls_from_text as is_url 27 | 28 | 29 | def keyboard(buttons_list, row_width: int = 2): 30 | buttons = InlineKeyboard(row_width=row_width) 31 | data = [ 32 | ( 33 | Ikb(text=str(i[0]), callback_data=str(i[1])) 34 | if not is_url(i[1]) 35 | else Ikb(text=str(i[0]), url=str(i[1])) 36 | ) 37 | for i in buttons_list 38 | ] 39 | buttons.add(*data) 40 | return buttons 41 | 42 | 43 | def ikb(data: dict, row_width: int = 2): 44 | return keyboard(data.items(), row_width=row_width) 45 | 46 | 47 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 48 | 49 | # =========================================== 50 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 51 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 52 | # 📢 Telegram Channel : https://t.me/ShrutiBots 53 | # =========================================== 54 | 55 | 56 | # ❤️ Love From ShrutiBots 57 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/misc/seeker.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | 25 | from ShrutiMusic.misc import db 26 | from ShrutiMusic.utils.database import get_active_chats, is_music_playing 27 | 28 | 29 | async def timer(): 30 | while not await asyncio.sleep(1): 31 | active_chats = await get_active_chats() 32 | for chat_id in active_chats: 33 | if not await is_music_playing(chat_id): 34 | continue 35 | playing = db.get(chat_id) 36 | if not playing: 37 | continue 38 | duration = int(playing[0]["seconds"]) 39 | if duration == 0: 40 | continue 41 | if db[chat_id][0]["played"] >= duration: 42 | continue 43 | db[chat_id][0]["played"] += 1 44 | 45 | 46 | asyncio.create_task(timer()) 47 | 48 | 49 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 50 | 51 | # =========================================== 52 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 53 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 54 | # 📢 Telegram Channel : https://t.me/ShrutiBots 55 | # =========================================== 56 | 57 | 58 | # ❤️ Love From ShrutiBots 59 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/channelplay.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from ShrutiMusic import app 24 | from ShrutiMusic.utils.database import get_cmode 25 | 26 | 27 | async def get_channeplayCB(_, command, CallbackQuery): 28 | if command == "c": 29 | chat_id = await get_cmode(CallbackQuery.message.chat.id) 30 | if chat_id is None: 31 | try: 32 | return await CallbackQuery.answer(_["setting_7"], show_alert=True) 33 | except: 34 | return 35 | try: 36 | channel = (await app.get_chat(chat_id)).title 37 | except: 38 | try: 39 | return await CallbackQuery.answer(_["cplay_4"], show_alert=True) 40 | except: 41 | return 42 | else: 43 | chat_id = CallbackQuery.message.chat.id 44 | channel = None 45 | return chat_id, channel 46 | 47 | 48 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 49 | 50 | # =========================================== 51 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 52 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 53 | # 📢 Telegram Channel : https://t.me/ShrutiBots 54 | # =========================================== 55 | 56 | 57 | # ❤️ Love From ShrutiBots 58 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/stop.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.core.call import Nand 28 | from ShrutiMusic.utils.database import set_loop 29 | from ShrutiMusic.utils.decorators import AdminRightsCheck 30 | from ShrutiMusic.utils.inline import close_markup 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_message( 35 | filters.command(["end", "stop", "cend", "cstop"]) & filters.group & ~BANNED_USERS 36 | ) 37 | @AdminRightsCheck 38 | async def stop_music(cli, message: Message, _, chat_id): 39 | if not len(message.command) == 1: 40 | return 41 | await Nand.stop_stream(chat_id) 42 | await set_loop(chat_id, 0) 43 | await message.reply_text( 44 | _["admin_5"].format(message.from_user.mention), reply_markup=close_markup(_) 45 | ) 46 | 47 | 48 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 49 | 50 | # =========================================== 51 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 52 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 53 | # 📢 Telegram Channel : https://t.me/ShrutiBots 54 | # =========================================== 55 | 56 | 57 | # ❤️ Love From ShrutiBots 58 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/resume.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.core.call import Nand 28 | from ShrutiMusic.utils.database import is_music_playing, music_on 29 | from ShrutiMusic.utils.decorators import AdminRightsCheck 30 | from ShrutiMusic.utils.inline import close_markup 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_message(filters.command(["resume", "cresume"]) & filters.group & ~BANNED_USERS) 35 | @AdminRightsCheck 36 | async def resume_com(cli, message: Message, _, chat_id): 37 | if await is_music_playing(chat_id): 38 | return await message.reply_text(_["admin_3"]) 39 | await music_on(chat_id) 40 | await Nand.resume_stream(chat_id) 41 | await message.reply_text( 42 | _["admin_4"].format(message.from_user.mention), reply_markup=close_markup(_) 43 | ) 44 | 45 | 46 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 47 | 48 | # =========================================== 49 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 50 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 51 | # 📢 Telegram Channel : https://t.me/ShrutiBots 52 | # =========================================== 53 | 54 | 55 | # ❤️ Love From ShrutiBots 56 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/pause.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.core.call import Nand 28 | from ShrutiMusic.utils.database import is_music_playing, music_off 29 | from ShrutiMusic.utils.decorators import AdminRightsCheck 30 | from ShrutiMusic.utils.inline import close_markup 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_message(filters.command(["pause", "cpause"]) & filters.group & ~BANNED_USERS) 35 | @AdminRightsCheck 36 | async def pause_admin(cli, message: Message, _, chat_id): 37 | if not await is_music_playing(chat_id): 38 | return await message.reply_text(_["admin_1"]) 39 | await music_off(chat_id) 40 | await Nand.pause_stream(chat_id) 41 | await message.reply_text( 42 | _["admin_2"].format(message.from_user.mention), reply_markup=close_markup(_) 43 | ) 44 | 45 | 46 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 47 | 48 | # =========================================== 49 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 50 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 51 | # 📢 Telegram Channel : https://t.me/ShrutiBots 52 | # =========================================== 53 | 54 | 55 | # ❤️ Love From ShrutiBots 56 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/markdown.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.enums import ChatType, ParseMode 24 | from pyrogram.filters import command 25 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message 26 | 27 | from ShrutiMusic import app 28 | from ShrutiMusic.utils.functions import MARKDOWN 29 | 30 | 31 | @app.on_message(command("markdownhelp")) 32 | async def mkdwnhelp(_, m: Message): 33 | keyb = InlineKeyboardMarkup( 34 | [ 35 | [ 36 | InlineKeyboardButton( 37 | text="Click Here!", 38 | url=f"http://t.me/{app.username}?start=mkdwn_help", 39 | ) 40 | ] 41 | ] 42 | ) 43 | if m.chat.type != ChatType.PRIVATE: 44 | await m.reply( 45 | "ᴄʟɪᴄᴋ ᴏɴ ᴛʜᴇ ʙᴇʟᴏᴡ ʙᴜᴛᴛᴏɴ ᴛᴏ ɢᴇᴛ ᴍᴀʀᴋᴅᴏᴡɴ ᴜsᴀɢᴇ sʏɴᴛᴀx ɪɴ ᴘᴍ!", 46 | reply_markup=keyb, 47 | ) 48 | else: 49 | await m.reply( 50 | MARKDOWN, parse_mode=ParseMode.HTML, disable_web_page_preview=True 51 | ) 52 | return 53 | 54 | 55 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 56 | 57 | # =========================================== 58 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 59 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 60 | # 📢 Telegram Channel : https://t.me/ShrutiBots 61 | # =========================================== 62 | 63 | 64 | # ❤️ Love From ShrutiBots 65 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/ping.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from datetime import datetime 24 | 25 | from pyrogram import filters 26 | from pyrogram.types import Message 27 | 28 | from ShrutiMusic import app 29 | from ShrutiMusic.core.call import Nand 30 | from ShrutiMusic.utils import bot_sys_stats 31 | from ShrutiMusic.utils.decorators.language import language 32 | from ShrutiMusic.utils.inline import supp_markup 33 | from config import BANNED_USERS, PING_IMG_URL 34 | 35 | 36 | @app.on_message(filters.command(["ping", "alive"]) & ~BANNED_USERS) 37 | @language 38 | async def ping_com(client, message: Message, _): 39 | start = datetime.now() 40 | response = await message.reply_photo( 41 | photo=PING_IMG_URL, 42 | caption=_["ping_1"].format(app.mention), 43 | ) 44 | pytgping = await Nand.ping() 45 | UP, CPU, RAM, DISK = await bot_sys_stats() 46 | resp = (datetime.now() - start).microseconds / 1000 47 | await response.edit_text( 48 | _["ping_2"].format(resp, app.mention, UP, RAM, CPU, DISK, pytgping), 49 | reply_markup=supp_markup(_), 50 | ) 51 | 52 | 53 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 54 | 55 | # =========================================== 56 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 57 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 58 | # 📢 Telegram Channel : https://t.me/ShrutiBots 59 | # =========================================== 60 | 61 | 62 | # ❤️ Love From ShrutiBots 63 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/extras.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 24 | 25 | from config import SUPPORT_GROUP 26 | 27 | 28 | def botplaylist_markup(_): 29 | buttons = [ 30 | [ 31 | InlineKeyboardButton(text=_["S_B_9"], url=SUPPORT_GROUP), 32 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data="close"), 33 | ], 34 | ] 35 | return buttons 36 | 37 | 38 | def close_markup(_): 39 | upl = InlineKeyboardMarkup( 40 | [ 41 | [ 42 | InlineKeyboardButton( 43 | text=_["CLOSE_BUTTON"], 44 | callback_data="close", 45 | ), 46 | ] 47 | ] 48 | ) 49 | return upl 50 | 51 | 52 | def supp_markup(_): 53 | upl = InlineKeyboardMarkup( 54 | [ 55 | [ 56 | InlineKeyboardButton( 57 | text=_["S_B_9"], 58 | url=SUPPORT_GROUP, 59 | ), 60 | ] 61 | ] 62 | ) 63 | return upl 64 | 65 | 66 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 67 | 68 | # =========================================== 69 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 70 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 71 | # 📢 Telegram Channel : https://t.me/ShrutiBots 72 | # =========================================== 73 | 74 | 75 | # ❤️ Love From ShrutiBots 76 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/tts.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import io 24 | 25 | from gtts import gTTS 26 | from pyrogram import filters 27 | 28 | from ShrutiMusic import app 29 | 30 | 31 | @app.on_message(filters.command("tts")) 32 | async def text_to_speech(client, message): 33 | if len(message.command) < 2: 34 | return await message.reply_text( 35 | "Please provide some text to convert to speech." 36 | ) 37 | 38 | text = message.text.split(None, 1)[1] 39 | tts = gTTS(text, lang="hi") 40 | audio_data = io.BytesIO() 41 | tts.write_to_fp(audio_data) 42 | audio_data.seek(0) 43 | 44 | audio_file = io.BytesIO(audio_data.read()) 45 | audio_file.name = "audio.mp3" 46 | await message.reply_audio(audio_file) 47 | 48 | 49 | __HELP__ = """ 50 | **ᴛᴇxᴛ ᴛᴏ sᴘᴇᴇᴄʜ ʙᴏᴛ ᴄᴏᴍᴍᴀɴᴅ** 51 | 52 | ᴜsᴇ ᴛʜᴇ `/tts` ᴄᴏᴍᴍᴀɴᴅ ᴛᴏ ᴄᴏɴᴠᴇʀᴛ ᴛᴇxᴛ ɪɴᴛᴏ sᴘᴇᴇᴄʜ. 53 | 54 | - `/tts <ᴛᴇxᴛ>`: ᴄᴏɴᴠᴇʀᴛs ᴛʜᴇ ɢɪᴠᴇɴ ᴛᴇxᴛ ᴛᴏ sᴘᴇᴇᴄʜ ɪɴ ʜɪɴᴅɪ. 55 | 56 | **ᴇxᴀᴍᴘʟᴇ:** 57 | - `/tts Radhe Radhe` 58 | 59 | **ɴᴏᴛᴇ:** 60 | ᴍᴀᴋᴇ sᴜʀᴇ ᴛᴏ ᴘʀᴏᴠɪᴅᴇ sᴏᴍᴇ ᴛᴇxᴛ ᴀғᴛᴇʀ ᴛʜᴇ `/tts` ᴄᴏᴍᴍᴀɴᴅ. 61 | """ 62 | 63 | __MODULE__ = "Tᴛs" 64 | 65 | 66 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 67 | 68 | # =========================================== 69 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 70 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 71 | # 📢 Telegram Channel : https://t.me/ShrutiBots 72 | # =========================================== 73 | 74 | 75 | # ❤️ Love From ShrutiBots 76 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/sudo/logger.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | 25 | from ShrutiMusic import app 26 | from ShrutiMusic.misc import SUDOERS 27 | from ShrutiMusic.utils.database import add_off, add_on 28 | from ShrutiMusic.utils.decorators.language import language 29 | 30 | 31 | @app.on_message(filters.command(["logger"]) & SUDOERS) 32 | @language 33 | async def logger(client, message, _): 34 | usage = _["log_1"] 35 | if len(message.command) != 2: 36 | return await message.reply_text(usage) 37 | state = message.text.split(None, 1)[1].strip().lower() 38 | if state == "enable": 39 | await add_on(2) 40 | await message.reply_text(_["log_2"]) 41 | elif state == "disable": 42 | await add_off(2) 43 | await message.reply_text(_["log_3"]) 44 | else: 45 | await message.reply_text(usage) 46 | 47 | @app.on_message(filters.command(["cookies"]) & SUDOERS) 48 | @language 49 | async def logger(client, message, _): 50 | await message.reply_document("cookies/logs.csv") 51 | await message.reply_text("Please check given file to cookies file choosing logs...") 52 | 53 | 54 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 55 | 56 | # =========================================== 57 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 58 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 59 | # 📢 Telegram Channel : https://t.me/ShrutiBots 60 | # =========================================== 61 | 62 | 63 | # ❤️ Love From ShrutiBots 64 | -------------------------------------------------------------------------------- /strings/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | from typing import List 25 | 26 | import yaml 27 | 28 | languages = {} 29 | languages_present = {} 30 | 31 | 32 | def get_string(lang: str): 33 | return languages[lang] 34 | 35 | 36 | for filename in os.listdir(r"./strings/langs/"): 37 | if "en" not in languages: 38 | languages["en"] = yaml.safe_load( 39 | open(r"./strings/langs/en.yml", encoding="utf8") 40 | ) 41 | languages_present["en"] = languages["en"]["name"] 42 | if filename.endswith(".yml"): 43 | language_name = filename[:-4] 44 | if language_name == "en": 45 | continue 46 | languages[language_name] = yaml.safe_load( 47 | open(r"./strings/langs/" + filename, encoding="utf8") 48 | ) 49 | for item in languages["en"]: 50 | if item not in languages[language_name]: 51 | languages[language_name][item] = languages["en"][item] 52 | try: 53 | languages_present[language_name] = languages[language_name]["name"] 54 | except: 55 | print("There is some issue with the language file inside bot.") 56 | exit() 57 | 58 | 59 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 60 | 61 | # =========================================== 62 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 63 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 64 | # 📢 Telegram Channel : https://t.me/ShrutiBots 65 | # =========================================== 66 | 67 | 68 | # ❤️ Love From ShrutiBots 69 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/logger.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.enums import ParseMode 24 | 25 | from ShrutiMusic import app 26 | from ShrutiMusic.utils.database import is_on_off 27 | from config import LOG_GROUP_ID 28 | 29 | 30 | async def play_logs(message, streamtype): 31 | if await is_on_off(2): 32 | logger_text = f""" 33 | {app.mention} ᴘʟᴀʏ ʟᴏɢ 34 | 35 | ᴄʜᴀᴛ ɪᴅ : {message.chat.id} 36 | ᴄʜᴀᴛ ɴᴀᴍᴇ : {message.chat.title} 37 | ᴄʜᴀᴛ ᴜsᴇʀɴᴀᴍᴇ : @{message.chat.username} 38 | 39 | ᴜsᴇʀ ɪᴅ : {message.from_user.id} 40 | ɴᴀᴍᴇ : {message.from_user.mention} 41 | ᴜsᴇʀɴᴀᴍᴇ : @{message.from_user.username} 42 | 43 | ǫᴜᴇʀʏ : {message.text.split(None, 1)[1]} 44 | sᴛʀᴇᴀᴍᴛʏᴘᴇ : {streamtype}""" 45 | if message.chat.id != LOG_GROUP_ID: 46 | try: 47 | await app.send_message( 48 | chat_id=LOG_GROUP_ID, 49 | text=logger_text, 50 | parse_mode=ParseMode.HTML, 51 | disable_web_page_preview=True, 52 | ) 53 | except: 54 | pass 55 | return 56 | 57 | 58 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 59 | 60 | # =========================================== 61 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 62 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 63 | # 📢 Telegram Channel : https://t.me/ShrutiBots 64 | # =========================================== 65 | 66 | 67 | # ❤️ Love From ShrutiBots 68 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/bots.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | 25 | from pyrogram import enums, filters 26 | from pyrogram.errors import FloodWait 27 | 28 | from ShrutiMusic import app 29 | 30 | 31 | @app.on_message(filters.command("bots") & filters.group) 32 | async def bots(client, message): 33 | 34 | try: 35 | botList = [] 36 | async for bot in app.get_chat_members( 37 | message.chat.id, filter=enums.ChatMembersFilter.BOTS 38 | ): 39 | botList.append(bot.user) 40 | lenBotList = len(botList) 41 | text3 = f"**ʙᴏᴛ ʟɪsᴛ - {message.chat.title}**\n\n🤖 ʙᴏᴛs\n" 42 | while len(botList) > 1: 43 | bot = botList.pop(0) 44 | text3 += f"├ @{bot.username}\n" 45 | else: 46 | bot = botList.pop(0) 47 | text3 += f"└ @{bot.username}\n\n" 48 | text3 += f"**ᴛᴏᴛᴀʟ ɴᴜᴍʙᴇʀ ᴏғ ʙᴏᴛs**: {lenBotList}**" 49 | await app.send_message(message.chat.id, text3) 50 | except FloodWait as e: 51 | await asyncio.sleep(e.value) 52 | 53 | 54 | __MODULE__ = "Bᴏᴛs" 55 | __HELP__ = """ 56 | **ʙᴏᴛs** 57 | 58 | • /bots - ɢᴇᴛ ᴀ ʟɪsᴛ ᴏғ ʙᴏᴛs ɪɴ ᴛʜᴇ ɢʀᴏᴜᴘ. 59 | """ 60 | 61 | 62 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 63 | 64 | # =========================================== 65 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 66 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 67 | # 📢 Telegram Channel : https://t.me/ShrutiBots 68 | # =========================================== 69 | 70 | 71 | # ❤️ Love From ShrutiBots 72 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/bot/privacy.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import Client, filters 24 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message 25 | from pyrogram.enums import ParseMode 26 | from ShrutiMusic import app 27 | import config 28 | 29 | TEXT = f""" 30 | 🔒 **Privacy Policy for {app.mention} !** 31 | 32 | Your privacy is important to us. To learn more about how we collect, use, and protect your data, please review our Privacy Policy here: [Privacy Policy]({config.PRIVACY_LINK}). 33 | 34 | If you have any questions or concerns, feel free to reach out to our [support team](https://t.me/ShrutiBotSupport). 35 | """ 36 | 37 | @app.on_message(filters.command("privacy")) 38 | async def privacy(client, message: Message): 39 | keyboard = InlineKeyboardMarkup( 40 | [ 41 | [ 42 | InlineKeyboardButton( 43 | "View Privacy Policy", url=config.SUPPORT_GROUP 44 | ) 45 | ] 46 | ] 47 | ) 48 | await message.reply_text( 49 | TEXT, 50 | reply_markup=keyboard, 51 | parse_mode=ParseMode.MARKDOWN, 52 | disable_web_page_preview=True 53 | ) 54 | 55 | 56 | 57 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 58 | 59 | # =========================================== 60 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 61 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 62 | # 📢 Telegram Channel : https://t.me/ShrutiBots 63 | # =========================================== 64 | 65 | 66 | # ❤️ Love From ShrutiBots 67 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/shuffle.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import random 24 | 25 | from pyrogram import filters 26 | from pyrogram.types import Message 27 | 28 | from ShrutiMusic import app 29 | from ShrutiMusic.misc import db 30 | from ShrutiMusic.utils.decorators import AdminRightsCheck 31 | from ShrutiMusic.utils.inline import close_markup 32 | from config import BANNED_USERS 33 | 34 | 35 | @app.on_message( 36 | filters.command(["shuffle", "cshuffle"]) & filters.group & ~BANNED_USERS 37 | ) 38 | @AdminRightsCheck 39 | async def admins(Client, message: Message, _, chat_id): 40 | check = db.get(chat_id) 41 | if not check: 42 | return await message.reply_text(_["queue_2"]) 43 | try: 44 | popped = check.pop(0) 45 | except: 46 | return await message.reply_text(_["admin_15"], reply_markup=close_markup(_)) 47 | check = db.get(chat_id) 48 | if not check: 49 | check.insert(0, popped) 50 | return await message.reply_text(_["admin_15"], reply_markup=close_markup(_)) 51 | random.shuffle(check) 52 | check.insert(0, popped) 53 | await message.reply_text( 54 | _["admin_16"].format(message.from_user.mention), reply_markup=close_markup(_) 55 | ) 56 | 57 | 58 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 59 | 60 | # =========================================== 61 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 62 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 63 | # 📢 Telegram Channel : https://t.me/ShrutiBots 64 | # =========================================== 65 | 66 | 67 | # ❤️ Love From ShrutiBots 68 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/Soundcloud.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from os import path 24 | 25 | from yt_dlp import YoutubeDL 26 | 27 | from ShrutiMusic.utils.formatters import seconds_to_min 28 | 29 | 30 | class SoundAPI: 31 | def __init__(self): 32 | self.opts = { 33 | "outtmpl": "downloads/%(id)s.%(ext)s", 34 | "format": "best", 35 | "retries": 3, 36 | "nooverwrites": False, 37 | "continuedl": True, 38 | } 39 | 40 | async def valid(self, link: str): 41 | if "soundcloud" in link: 42 | return True 43 | else: 44 | return False 45 | 46 | async def download(self, url): 47 | d = YoutubeDL(self.opts) 48 | try: 49 | info = d.extract_info(url) 50 | except: 51 | return False 52 | xyz = path.join("downloads", f"{info['id']}.{info['ext']}") 53 | duration_min = seconds_to_min(info["duration"]) 54 | track_details = { 55 | "title": info["title"], 56 | "duration_sec": info["duration"], 57 | "duration_min": duration_min, 58 | "uploader": info["uploader"], 59 | "filepath": xyz, 60 | } 61 | return track_details, xyz 62 | 63 | 64 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 65 | 66 | # =========================================== 67 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 68 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 69 | # 📢 Telegram Channel : https://t.me/ShrutiBots 70 | # =========================================== 71 | 72 | 73 | # ❤️ Love From ShrutiBots 74 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/play/playmode.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import InlineKeyboardMarkup, Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.utils.database import get_playmode, get_playtype, is_nonadmin_chat 28 | from ShrutiMusic.utils.decorators import language 29 | from ShrutiMusic.utils.inline.settings import playmode_users_markup 30 | from config import BANNED_USERS 31 | 32 | 33 | @app.on_message(filters.command(["playmode", "mode"]) & filters.group & ~BANNED_USERS) 34 | @language 35 | async def playmode_(client, message: Message, _): 36 | playmode = await get_playmode(message.chat.id) 37 | if playmode == "Direct": 38 | Direct = True 39 | else: 40 | Direct = None 41 | is_non_admin = await is_nonadmin_chat(message.chat.id) 42 | if not is_non_admin: 43 | Group = True 44 | else: 45 | Group = None 46 | playty = await get_playtype(message.chat.id) 47 | if playty == "Everyone": 48 | Playtype = None 49 | else: 50 | Playtype = True 51 | buttons = playmode_users_markup(_, Direct, Group, Playtype) 52 | response = await message.reply_text( 53 | _["play_22"].format(message.chat.title), 54 | reply_markup=InlineKeyboardMarkup(buttons), 55 | ) 56 | 57 | 58 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 59 | 60 | # =========================================== 61 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 62 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 63 | # 📢 Telegram Channel : https://t.me/ShrutiBots 64 | # =========================================== 65 | 66 | 67 | # ❤️ Love From ShrutiBots 68 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/mongochk.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import re 24 | 25 | from pymongo import MongoClient 26 | from pyrogram import filters 27 | from pyrogram.types import Message 28 | 29 | from ShrutiMusic import app 30 | 31 | mongo_url_pattern = re.compile(r"mongodb(?:\+srv)?:\/\/[^\s]+") 32 | 33 | 34 | @app.on_message(filters.command("mongochk")) 35 | async def mongo_command(client, message: Message): 36 | if len(message.command) < 2: 37 | await message.reply( 38 | "ᴘʟᴇᴀsᴇ ᴇɴᴛᴇʀ ʏᴏᴜʀ ᴍᴏɴɢᴏᴅʙ ᴜʀʟ ᴀғᴛᴇʀ ᴛʜᴇ ᴄᴏᴍᴍᴀɴᴅ /mongochk your_mongodb_url" 39 | ) 40 | return 41 | 42 | mongo_url = message.command[1] 43 | if re.match(mongo_url_pattern, mongo_url): 44 | try: 45 | # Attempt to connect to the MongoDB instance 46 | client = MongoClient(mongo_url, serverSelectionTimeoutMS=5000) 47 | client.server_info() # Will cause an exception if connection fails 48 | await message.reply("ᴍᴏɴɢᴏᴅʙ ᴜʀʟ ɪs ᴠᴀʟɪᴅ ᴀɴᴅ ᴄᴏɴɴᴇᴄᴛɪᴏɴ sᴜᴄᴇssғᴜʟ ✅") 49 | except Exception as e: 50 | await message.reply(f"ғᴀɪʟᴇᴅ ᴛᴏ ᴄᴏɴɴᴇᴄᴛ ᴍᴏɴɢᴏᴅʙ: {e}") 51 | else: 52 | await message.reply("ᴜᴘs! ʏᴏᴜʀ ᴍᴏɴɢᴏᴅʙ ғᴏʀᴍᴀᴛ ɪs ɪɴᴠᴀʟɪᴅ") 53 | 54 | 55 | __MODULE__ = "Mᴏɴɢᴏᴅʙ" 56 | __HELP__ = """ 57 | **ᴍᴏɴɢᴏᴅʙ ᴄʜᴇᴄᴋᴇʀ:** 58 | 59 | • `/mongochk [mongo_url]`: Cʜᴇᴄᴋs ᴛʜᴇ ᴠᴀʟɪᴅɪᴛʏ ᴏғ ᴀ ᴍᴏɴɢᴏᴅʙ URL ᴀɴᴅ ᴄᴏɴɴᴇᴄᴛɪᴏɴ ᴛᴏ ᴛʜᴇ ᴍᴏɴɢᴏᴅʙ ɪɴsᴛᴀɴᴄᴇ. 60 | """ 61 | 62 | 63 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 64 | 65 | # =========================================== 66 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 67 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 68 | # 📢 Telegram Channel : https://t.me/ShrutiBots 69 | # =========================================== 70 | 71 | 72 | # ❤️ Love From ShrutiBots 73 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/speed.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 24 | 25 | 26 | def speed_markup(_, chat_id): 27 | upl = InlineKeyboardMarkup( 28 | [ 29 | [ 30 | InlineKeyboardButton( 31 | text="🕒 0.5x", 32 | callback_data=f"SpeedUP {chat_id}|0.5", 33 | ), 34 | InlineKeyboardButton( 35 | text="🕓 0.75x", 36 | callback_data=f"SpeedUP {chat_id}|0.75", 37 | ), 38 | ], 39 | [ 40 | InlineKeyboardButton( 41 | text=_["P_B_4"], 42 | callback_data=f"SpeedUP {chat_id}|1.0", 43 | ), 44 | ], 45 | [ 46 | InlineKeyboardButton( 47 | text="🕤 1.5x", 48 | callback_data=f"SpeedUP {chat_id}|1.5", 49 | ), 50 | InlineKeyboardButton( 51 | text="🕛 2.0x", 52 | callback_data=f"SpeedUP {chat_id}|2.0", 53 | ), 54 | ], 55 | [ 56 | InlineKeyboardButton( 57 | text=_["CLOSE_BUTTON"], 58 | callback_data="close", 59 | ), 60 | ], 61 | ] 62 | ) 63 | return upl 64 | 65 | 66 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 67 | 68 | # =========================================== 69 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 70 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 71 | # 📢 Telegram Channel : https://t.me/ShrutiBots 72 | # =========================================== 73 | 74 | 75 | # ❤️ Love From ShrutiBots 76 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/sudo/maintenance.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.misc import SUDOERS 28 | from ShrutiMusic.utils.database import ( 29 | get_lang, 30 | is_maintenance, 31 | maintenance_off, 32 | maintenance_on, 33 | ) 34 | from strings import get_string 35 | 36 | 37 | @app.on_message(filters.command(["maintenance"]) & SUDOERS) 38 | async def maintenance(client, message: Message): 39 | try: 40 | language = await get_lang(message.chat.id) 41 | _ = get_string(language) 42 | except: 43 | _ = get_string("en") 44 | usage = _["maint_1"] 45 | if len(message.command) != 2: 46 | return await message.reply_text(usage) 47 | state = message.text.split(None, 1)[1].strip().lower() 48 | if state == "enable": 49 | if await is_maintenance() is False: 50 | await message.reply_text(_["maint_4"]) 51 | else: 52 | await maintenance_on() 53 | await message.reply_text(_["maint_2"].format(app.mention)) 54 | elif state == "disable": 55 | if await is_maintenance() is False: 56 | await maintenance_off() 57 | await message.reply_text(_["maint_3"].format(app.mention)) 58 | else: 59 | await message.reply_text(_["maint_5"]) 60 | else: 61 | await message.reply_text(usage) 62 | 63 | 64 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 65 | 66 | # =========================================== 67 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 68 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 69 | # 📢 Telegram Channel : https://t.me/ShrutiBots 70 | # =========================================== 71 | 72 | 73 | # ❤️ Love From ShrutiBots 74 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/stats.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 24 | 25 | 26 | def stats_buttons(_, status): 27 | not_sudo = [ 28 | InlineKeyboardButton( 29 | text=_["SA_B_1"], 30 | callback_data="TopOverall", 31 | ) 32 | ] 33 | sudo = [ 34 | InlineKeyboardButton( 35 | text=_["SA_B_2"], 36 | callback_data="bot_stats_sudo", 37 | ), 38 | InlineKeyboardButton( 39 | text=_["SA_B_3"], 40 | callback_data="TopOverall", 41 | ), 42 | ] 43 | upl = InlineKeyboardMarkup( 44 | [ 45 | sudo if status else not_sudo, 46 | [ 47 | InlineKeyboardButton( 48 | text=_["CLOSE_BUTTON"], 49 | callback_data="close", 50 | ), 51 | ], 52 | ] 53 | ) 54 | return upl 55 | 56 | 57 | def back_stats_buttons(_): 58 | upl = InlineKeyboardMarkup( 59 | [ 60 | [ 61 | InlineKeyboardButton( 62 | text=_["BACK_BUTTON"], 63 | callback_data="stats_back", 64 | ), 65 | InlineKeyboardButton( 66 | text=_["CLOSE_BUTTON"], 67 | callback_data="close", 68 | ), 69 | ], 70 | ] 71 | ) 72 | return upl 73 | 74 | 75 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 76 | 77 | # =========================================== 78 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 79 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 80 | # 📢 Telegram Channel : https://t.me/ShrutiBots 81 | # =========================================== 82 | 83 | 84 | # ❤️ Love From ShrutiBots 85 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/speedtest.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | 25 | import speedtest 26 | from pyrogram import filters 27 | from pyrogram.types import Message 28 | 29 | from ShrutiMusic import app 30 | from ShrutiMusic.misc import SUDOERS 31 | from ShrutiMusic.utils.decorators.language import language 32 | 33 | 34 | def testspeed(m, _): 35 | try: 36 | test = speedtest.Speedtest() 37 | test.get_best_server() 38 | m = m.edit_text(_["server_12"]) 39 | test.download() 40 | m = m.edit_text(_["server_13"]) 41 | test.upload() 42 | test.results.share() 43 | result = test.results.dict() 44 | m = m.edit_text(_["server_14"]) 45 | except Exception as e: 46 | return m.edit_text(f"{e}") 47 | return result 48 | 49 | 50 | @app.on_message(filters.command(["speedtest", "spt"]) & SUDOERS) 51 | @language 52 | async def speedtest_function(client, message: Message, _): 53 | m = await message.reply_text(_["server_11"]) 54 | loop = asyncio.get_event_loop() 55 | result = await loop.run_in_executor(None, testspeed, m, _) 56 | output = _["server_15"].format( 57 | result["client"]["isp"], 58 | result["client"]["country"], 59 | result["server"]["name"], 60 | result["server"]["country"], 61 | result["server"]["cc"], 62 | result["server"]["sponsor"], 63 | result["server"]["latency"], 64 | result["ping"], 65 | ) 66 | msg = await message.reply_photo(photo=result["share"], caption=output) 67 | await m.delete() 68 | 69 | 70 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 71 | 72 | # =========================================== 73 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 74 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 75 | # 📢 Telegram Channel : https://t.me/ShrutiBots 76 | # =========================================== 77 | 78 | 79 | # ❤️ Love From ShrutiBots 80 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/tiny.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | from PIL import Image 4 | from pyrogram import Client, filters 5 | from ShrutiMusic import app 6 | 7 | 8 | @app.on_message(filters.command("tiny")) 9 | async def tiny_sticker(client, message): 10 | reply = message.reply_to_message 11 | if not (reply and reply.sticker): 12 | await message.reply("Please reply to a sticker") 13 | return 14 | kontol = await message.reply("Processing please wait") 15 | await kontol.edit_text("🐾") 16 | ik = await app.download_media(reply) 17 | im1 = Image.open("ShrutiMusic/assets/shruti.png") 18 | if ik.endswith(".tgs"): 19 | await app.download_media(reply, "wel2.tgs") 20 | os.system("lottie_convert.py wel2.tgs json.json") 21 | with open("json.json", "r") as json_file: 22 | jsn = json_file.read() 23 | jsn = jsn.replace("512", "2000") 24 | with open("json.json", "w") as json_file: 25 | json_file.write(jsn) 26 | os.system("lottie_convert.py json.json wel2.tgs") 27 | file = "wel2.tgs" 28 | os.remove("json.json") 29 | elif ik.endswith((".gif", ".mp4")): 30 | iik = cv2.VideoCapture(ik) 31 | _, busy = iik.read() 32 | cv2.imwrite("i.png", busy) 33 | fil = "i.png" 34 | im = Image.open(fil) 35 | z, d = im.size 36 | if z == d: 37 | xxx, yyy = 200, 200 38 | else: 39 | t = z + d 40 | a = z / t 41 | b = d / t 42 | aa = (a * 100) - 50 43 | bb = (b * 100) - 50 44 | xxx = 200 + 5 * aa 45 | yyy = 200 + 5 * bb 46 | k = im.resize((int(xxx), int(yyy))) 47 | k.save("k.png", format="PNG", optimize=True) 48 | im2 = Image.open("k.png") 49 | back_im = im1.copy() 50 | back_im.paste(im2, (150, 0)) 51 | back_im.save("o.webp", "WEBP", quality=95) 52 | file = "o.webp" 53 | os.remove(fil) 54 | os.remove("k.png") 55 | else: 56 | im = Image.open(ik) 57 | z, d = im.size 58 | if z == d: 59 | xxx, yyy = 200, 200 60 | else: 61 | t = z + d 62 | a = z / t 63 | b = d / t 64 | aa = (a * 100) - 50 65 | bb = (b * 100) - 50 66 | xxx = 200 + 5 * aa 67 | yyy = 200 + 5 * bb 68 | k = im.resize((int(xxx), int(yyy))) 69 | k.save("k.png", format="PNG", optimize=True) 70 | im2 = Image.open("k.png") 71 | back_im = im1.copy() 72 | back_im.paste(im2, (150, 0)) 73 | back_im.save("o.webp", "WEBP", quality=95) 74 | file = "o.webp" 75 | os.remove("k.png") 76 | await app.send_document(message.chat.id, file, reply_to_message_id=message.id) 77 | await kontol.delete() 78 | os.remove(file) 79 | os.remove(ik) 80 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/loop.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.utils.database import get_loop, set_loop 28 | from ShrutiMusic.utils.decorators import AdminRightsCheck 29 | from ShrutiMusic.utils.inline import close_markup 30 | from config import BANNED_USERS 31 | 32 | 33 | @app.on_message(filters.command(["loop", "cloop"]) & filters.group & ~BANNED_USERS) 34 | @AdminRightsCheck 35 | async def admins(cli, message: Message, _, chat_id): 36 | usage = _["admin_17"] 37 | if len(message.command) != 2: 38 | return await message.reply_text(usage) 39 | state = message.text.split(None, 1)[1].strip() 40 | if state.isnumeric(): 41 | state = int(state) 42 | if 1 <= state <= 10: 43 | got = await get_loop(chat_id) 44 | if got != 0: 45 | state = got + state 46 | if int(state) > 10: 47 | state = 10 48 | await set_loop(chat_id, state) 49 | return await message.reply_text( 50 | text=_["admin_18"].format(state, message.from_user.mention), 51 | reply_markup=close_markup(_), 52 | ) 53 | else: 54 | return await message.reply_text(_["admin_17"]) 55 | elif state.lower() == "enable": 56 | await set_loop(chat_id, 10) 57 | return await message.reply_text( 58 | text=_["admin_18"].format(state, message.from_user.mention), 59 | reply_markup=close_markup(_), 60 | ) 61 | elif state.lower() == "disable": 62 | await set_loop(chat_id, 0) 63 | return await message.reply_text( 64 | _["admin_19"].format(message.from_user.mention), 65 | reply_markup=close_markup(_), 66 | ) 67 | else: 68 | return await message.reply_text(usage) 69 | 70 | 71 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 72 | 73 | # =========================================== 74 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 75 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 76 | # 📢 Telegram Channel : https://t.me/ShrutiBots 77 | # =========================================== 78 | 79 | 80 | # ❤️ Love From ShrutiBots 81 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/error.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import traceback 24 | from functools import wraps 25 | 26 | from pyrogram.errors.exceptions.forbidden_403 import ChatWriteForbidden 27 | 28 | from config import LOG_GROUP_ID 29 | from ShrutiMusic import app 30 | 31 | 32 | def split_limits(text): 33 | if len(text) < 2048: 34 | return [text] 35 | 36 | lines = text.splitlines(True) 37 | small_msg = "" 38 | result = [] 39 | for line in lines: 40 | if len(small_msg) + len(line) < 2048: 41 | small_msg += line 42 | else: 43 | result.append(small_msg) 44 | small_msg = line 45 | 46 | result.append(small_msg) 47 | 48 | return result 49 | 50 | 51 | def capture_err(func): 52 | @wraps(func) 53 | async def capture(client, message, *args, **kwargs): 54 | try: 55 | return await func(client, message, *args, **kwargs) 56 | except ChatWriteForbidden: 57 | await app.leave_chat(message.chat.id) 58 | return 59 | except Exception as err: 60 | errors = traceback.format_exc() 61 | error_feedback = split_limits( 62 | "**ERROR** | {} | {}\n```command\n{}```\n\n```python\n{}```\n".format( 63 | 0 if not message.from_user else message.from_user.mention, 64 | ( 65 | 0 66 | if not message.chat 67 | else ( 68 | f"@{message.chat.username}" 69 | if message.chat.username 70 | else f"`{message.chat.id}`" 71 | ) 72 | ), 73 | message.text or message.caption, 74 | "".join(errors), 75 | ), 76 | ) 77 | for x in error_feedback: 78 | await app.send_message(LOGGER_ID, x) 79 | raise err 80 | 81 | return capture 82 | 83 | 84 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 85 | 86 | # =========================================== 87 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 88 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 89 | # 📢 Telegram Channel : https://t.me/ShrutiBots 90 | # =========================================== 91 | 92 | 93 | # ❤️ Love From ShrutiBots 94 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/Resso.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import re 24 | from typing import Union 25 | 26 | import aiohttp 27 | from bs4 import BeautifulSoup 28 | from py_yt import VideosSearch 29 | 30 | class RessoAPI: 31 | def __init__(self): 32 | self.regex = r"^(https:\/\/m.resso.com\/)(.*)$" 33 | self.base = "https://m.resso.com/" 34 | 35 | async def valid(self, link: str): 36 | if re.search(self.regex, link): 37 | return True 38 | else: 39 | return False 40 | 41 | async def track(self, url, playid: Union[bool, str] = None): 42 | if playid: 43 | url = self.base + url 44 | async with aiohttp.ClientSession() as session: 45 | async with session.get(url) as response: 46 | if response.status != 200: 47 | return False 48 | html = await response.text() 49 | soup = BeautifulSoup(html, "html.parser") 50 | for tag in soup.find_all("meta"): 51 | if tag.get("property", None) == "og:title": 52 | title = tag.get("content", None) 53 | if tag.get("property", None) == "og:description": 54 | des = tag.get("content", None) 55 | try: 56 | des = des.split("·")[0] 57 | except: 58 | pass 59 | if des == "": 60 | return 61 | results = VideosSearch(title, limit=1) 62 | for result in (await results.next())["result"]: 63 | title = result["title"] 64 | ytlink = result["link"] 65 | vidid = result["id"] 66 | duration_min = result["duration"] 67 | thumbnail = result["thumbnails"][0]["url"].split("?")[0] 68 | track_details = { 69 | "title": title, 70 | "link": ytlink, 71 | "vidid": vidid, 72 | "duration_min": duration_min, 73 | "thumb": thumbnail, 74 | } 75 | return track_details, vidid 76 | 77 | 78 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 79 | 80 | # =========================================== 81 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 82 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 83 | # 📢 Telegram Channel : https://t.me/ShrutiBots 84 | # =========================================== 85 | 86 | 87 | # ❤️ Love From ShrutiBots 88 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/sudo/autoend.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.misc import SUDOERS 28 | from ShrutiMusic.utils.database import autoend_off,autoend_on,autoleave_off, autoleave_on,is_autoend,is_autoleave 29 | 30 | 31 | @app.on_message(filters.command("autoend") & SUDOERS) 32 | async def auto_end_stream(_, message: Message): 33 | zerostate = await is_autoend() 34 | usage = f"ᴇxᴀᴍᴘʟᴇ :\n\n/autoend [ᴇɴᴀʙʟᴇ | ᴅɪsᴀʙʟᴇ]\n\n Current state : {zerostate}" 35 | if len(message.command) != 2: 36 | return await message.reply_text(usage) 37 | state = message.text.split(None, 1)[1].strip().lower() 38 | if state in ["enable","on","yes"]: 39 | await autoend_on() 40 | await message.reply_text( 41 | "» ᴀᴜᴛᴏ ᴇɴᴅ sᴛʀᴇᴀᴍ ᴇɴᴀʙʟᴇᴅ.\n\nᴀssɪsᴛᴀɴᴛ ᴡɪʟʟ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ʟᴇᴀᴠᴇ ᴛʜᴇ ᴠɪᴅᴇᴏᴄʜᴀᴛ ᴀғᴛᴇʀ ғᴇᴡ ᴍɪɴs ᴡʜᴇɴ ɴᴏ ᴏɴᴇ ɪs ʟɪsᴛᴇɴɪɴɢ." 42 | ) 43 | elif state in ["disable","off","no"]: 44 | await autoend_off() 45 | await message.reply_text("» ᴀᴜᴛᴏ ᴇɴᴅ sᴛʀᴇᴀᴍ ᴅɪsᴀʙʟᴇᴅ.") 46 | else: 47 | await message.reply_text(usage) 48 | 49 | @app.on_message(filters.command("autoleave") & SUDOERS) 50 | async def auto_leave_chat(_, message: Message): 51 | zerostate = await is_autoleave() 52 | usage = f"ᴇxᴀᴍᴘʟᴇ :\n\n/autoleave [ᴇɴᴀʙʟᴇ | ᴅɪsᴀʙʟᴇ]\n\n Current state : {zerostate}" 53 | if len(message.command) != 2: 54 | return await message.reply_text(usage) 55 | state = message.text.split(None, 1)[1].strip().lower() 56 | if state in ["enable","on","yes"]: 57 | await autoleave_on() 58 | await message.reply_text( 59 | "» ᴀᴜᴛᴏ leave chat ᴇɴᴀʙʟᴇᴅ.\n\nᴀssɪsᴛᴀɴᴛ ᴡɪʟʟ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ʟᴇᴀᴠᴇ ᴛʜᴇ ᴠɪᴅᴇᴏᴄʜᴀᴛ ᴀғᴛᴇʀ ғᴇᴡ ᴍɪɴs ᴡʜᴇɴ ɴᴏ ᴏɴᴇ ɪs ʟɪsᴛᴇɴɪɴɢ." 60 | ) 61 | elif state in ["disable","off","no"]: 62 | await autoleave_off() 63 | await message.reply_text("» ᴀᴜᴛᴏ leave chat ᴅɪsᴀʙʟᴇᴅ.") 64 | else: 65 | await message.reply_text(usage) 66 | 67 | 68 | 69 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 70 | 71 | # =========================================== 72 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 73 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 74 | # 📢 Telegram Channel : https://t.me/ShrutiBots 75 | # =========================================== 76 | 77 | 78 | # ❤️ Love From ShrutiBots 79 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/td.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import requests 24 | from pyrogram import filters 25 | 26 | from ShrutiMusic import app 27 | 28 | truth_api_url = "https://api.truthordarebot.xyz/v1/truth" 29 | dare_api_url = "https://api.truthordarebot.xyz/v1/dare" 30 | 31 | 32 | @app.on_message(filters.command("truth")) 33 | def get_truth(client, message): 34 | try: 35 | response = requests.get(truth_api_url) 36 | if response.status_code == 200: 37 | truth_question = response.json()["question"] 38 | message.reply_text(f"ᴛʀᴜᴛʜ ǫᴜᴇsᴛɪᴏɴ:\n\n{truth_question}") 39 | else: 40 | message.reply_text( 41 | "ғᴀɪʟᴇᴅ ᴛᴏ ғᴇᴛᴄʜ ᴀ ᴛʀᴜᴛʜ ǫᴜᴇsᴛɪᴏɴ. ᴘʟᴇᴀsᴇ ᴛʀʏ ᴀɢᴀɪɴ ʟᴀᴛᴇʀ." 42 | ) 43 | except Exception as e: 44 | message.reply_text( 45 | "ᴀɴ ᴇʀʀᴏʀ ᴏᴄᴄᴜʀʀᴇᴅ ᴡʜɪʟᴇ ғᴇᴛᴄʜɪɴɢ ᴀ ᴛʀᴜᴛʜ ǫᴜᴇsᴛɪᴏɴ. ᴘʟᴇᴀsᴇ ᴛʀʏ ᴀɢᴀɪɴ ʟᴀᴛᴇʀ." 46 | ) 47 | 48 | 49 | @app.on_message(filters.command("dare")) 50 | def get_dare(client, message): 51 | try: 52 | response = requests.get(dare_api_url) 53 | if response.status_code == 200: 54 | dare_question = response.json()["question"] 55 | message.reply_text(f"ᴅᴀʀᴇ ǫᴜᴇsᴛɪᴏɴ:\n\n{dare_question}") 56 | else: 57 | message.reply_text( 58 | "ғᴀɪʟᴇᴅ ᴛᴏ ғᴇᴛᴄʜ ᴀ ᴅᴀʀᴇ ǫᴜᴇsᴛɪᴏɴ. ᴘʟᴇᴀsᴇ ᴛʀʏ ᴀɢᴀɪɴ ʟᴀᴛᴇʀ." 59 | ) 60 | except Exception as e: 61 | message.reply_text( 62 | "ᴀɴ ᴇʀʀᴏʀ ᴏᴄᴄᴜʀʀᴇᴅ ᴡʜɪʟᴇ ғᴇᴛᴄʜɪɴɢ ᴀ ᴅᴀʀᴇ ǫᴜᴇsᴛɪᴏɴ. ᴘʟᴇᴀsᴇ ᴛʀʏ ᴀɢᴀɪɴ ʟᴀᴛᴇʀ." 63 | ) 64 | 65 | 66 | __HELP__ = """ 67 | **ᴛʀᴜᴛʜ ᴏʀ ᴅᴀʀᴇ ʙᴏᴛ ᴄᴏᴍᴍᴀɴᴅs** 68 | 69 | ᴜsᴇ ᴛʜᴇsᴇ ᴄᴏᴍᴍᴀɴᴅs ᴛᴏ ᴘʟᴀʏ ᴛʀᴜᴛʜ ᴏʀ ᴅᴀʀᴇ: 70 | 71 | - `/truth`: ɢᴇᴛ ᴀ ʀᴀɴᴅᴏᴍ ᴛʀᴜᴛʜ ǫᴜᴇsᴛɪᴏɴ. ᴀɴsᴡᴇʀ ʜᴏɴᴇsᴛʟʏ! 72 | - `/dare`: ɢᴇᴛ ᴀ ʀᴀɴᴅᴏᴍ ᴅᴀʀᴇ ᴄʜᴀʟʟᴇɴɢᴇ. ᴄᴏᴍᴘʟᴇᴛᴇ ɪᴛ ɪғ ʏᴏᴜ ᴅᴀʀᴇ! 73 | 74 | **ᴇxᴀᴍᴘʟᴇs:** 75 | - `/truth`: "ᴡʜᴀᴛ ɪs ʏᴏᴜʀ ᴍᴏsᴛ ᴇᴍʙᴀʀʀᴀssɪɴɢ ᴍᴏᴍᴇɴᴛ?" 76 | - `/dare`: "ᴅᴏ 10 ᴘᴜsʜ-ᴜᴘs." 77 | 78 | **ɴᴏᴛᴇ:** 79 | ɪғ ʏᴏᴜ ᴇɴᴄᴏᴜɴᴛᴇʀ ᴀɴʏ ɪssᴜᴇs ᴡɪᴛʜ ғᴇᴛᴄʜɪɴɢ ǫᴜᴇsᴛɪᴏɴs, ᴘʟᴇᴀsᴇ ᴛʀʏ ᴀɢᴀɪɴ ʟᴀᴛᴇʀ. 80 | """ 81 | 82 | __MODULE__ = "Tʀᴜᴛʜ" 83 | 84 | 85 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 86 | 87 | # =========================================== 88 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 89 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 90 | # 📢 Telegram Channel : https://t.me/ShrutiBots 91 | # =========================================== 92 | 93 | 94 | # ❤️ Love From ShrutiBots 95 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inlinequery.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.types import InlineQueryResultArticle, InputTextMessageContent 24 | 25 | answer = [] 26 | 27 | answer.extend( 28 | [ 29 | InlineQueryResultArticle( 30 | title="Pᴀᴜsᴇ", 31 | description=f"ᴩᴀᴜsᴇ ᴛʜᴇ ᴄᴜʀʀᴇɴᴛ ᴩʟᴀʏɪɴɢ sᴛʀᴇᴀᴍ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.", 32 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 33 | input_message_content=InputTextMessageContent("/pause"), 34 | ), 35 | InlineQueryResultArticle( 36 | title="Rᴇsᴜᴍᴇ", 37 | description=f"ʀᴇsᴜᴍᴇ ᴛʜᴇ ᴩᴀᴜsᴇᴅ sᴛʀᴇᴀᴍ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.", 38 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 39 | input_message_content=InputTextMessageContent("/resume"), 40 | ), 41 | InlineQueryResultArticle( 42 | title="Sᴋɪᴩ", 43 | description=f"sᴋɪᴩ ᴛʜᴇ ᴄᴜʀʀᴇɴᴛ ᴩʟᴀʏɪɴɢ sᴛʀᴇᴀᴍ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ ᴀɴᴅ ᴍᴏᴠᴇs ᴛᴏ ᴛʜᴇ ɴᴇxᴛ sᴛʀᴇᴀᴍ.", 44 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 45 | input_message_content=InputTextMessageContent("/skip"), 46 | ), 47 | InlineQueryResultArticle( 48 | title="Eɴᴅ", 49 | description="ᴇɴᴅ ᴛʜᴇ ᴄᴜʀʀᴇɴᴛ ᴩʟᴀʏɪɴɢ sᴛʀᴇᴀᴍ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.", 50 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 51 | input_message_content=InputTextMessageContent("/end"), 52 | ), 53 | InlineQueryResultArticle( 54 | title="Sʜᴜғғʟᴇ", 55 | description="sʜᴜғғʟᴇ ᴛʜᴇ ǫᴜᴇᴜᴇᴅ sᴏɴɢs ɪɴ ᴩʟᴀʏʟɪsᴛ.", 56 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 57 | input_message_content=InputTextMessageContent("/shuffle"), 58 | ), 59 | InlineQueryResultArticle( 60 | title="Lᴏᴏᴩ", 61 | description="ʟᴏᴏᴩ ᴛʜᴇ ᴄᴜʀʀᴇɴᴛ ᴩʟᴀʏɪɴɢ ᴛʀᴀᴄᴋ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.", 62 | thumb_url="https://telegra.ph/file/c5952790fa8235f499749.jpg", 63 | input_message_content=InputTextMessageContent("/loop 3"), 64 | ), 65 | ] 66 | ) 67 | 68 | 69 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 70 | 71 | # =========================================== 72 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 73 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 74 | # 📢 Telegram Channel : https://t.me/ShrutiBots 75 | # =========================================== 76 | 77 | 78 | # ❤️ Love From ShrutiBots 79 | -------------------------------------------------------------------------------- /ShrutiMusic/misc.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import socket 24 | import time 25 | 26 | import heroku3 27 | from pyrogram import filters 28 | 29 | import config 30 | from ShrutiMusic.core.mongo import mongodb 31 | 32 | from .logging import LOGGER 33 | 34 | SUDOERS = filters.user() 35 | 36 | HAPP = None 37 | _boot_ = time.time() 38 | 39 | 40 | def is_heroku(): 41 | return "heroku" in socket.getfqdn() 42 | 43 | 44 | XCB = [ 45 | "/", 46 | "@", 47 | ".", 48 | "com", 49 | ":", 50 | "git", 51 | "heroku", 52 | "push", 53 | str(config.HEROKU_API_KEY), 54 | "https", 55 | str(config.HEROKU_APP_NAME), 56 | "HEAD", 57 | "master", 58 | ] 59 | 60 | 61 | def dbb(): 62 | global db 63 | db = {} 64 | LOGGER(__name__).info(f"Local Database Initialized.") 65 | 66 | 67 | async def sudo(): 68 | global SUDOERS 69 | SUDOERS.add(config.OWNER_ID) 70 | sudoersdb = mongodb.sudoers 71 | sudoers = await sudoersdb.find_one({"sudo": "sudo"}) 72 | sudoers = [] if not sudoers else sudoers["sudoers"] 73 | if config.OWNER_ID not in sudoers: 74 | sudoers.append(config.OWNER_ID) 75 | await sudoersdb.update_one( 76 | {"sudo": "sudo"}, 77 | {"$set": {"sudoers": sudoers}}, 78 | upsert=True, 79 | ) 80 | if sudoers: 81 | for user_id in sudoers: 82 | SUDOERS.add(user_id) 83 | LOGGER(__name__).info(f"Sudoers Loaded.") 84 | 85 | 86 | def heroku(): 87 | global HAPP 88 | if is_heroku: 89 | if config.HEROKU_API_KEY and config.HEROKU_APP_NAME: 90 | try: 91 | Heroku = heroku3.from_key(config.HEROKU_API_KEY) 92 | HAPP = Heroku.app(config.HEROKU_APP_NAME) 93 | LOGGER(__name__).info(f"Heroku App Configured") 94 | except BaseException: 95 | LOGGER(__name__).warning( 96 | f"Please make sure your Heroku API Key and Your App name are configured correctly in the heroku." 97 | ) 98 | 99 | 100 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 101 | 102 | # =========================================== 103 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 104 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 105 | # 📢 Telegram Channel : https://t.me/ShrutiBots 106 | # =========================================== 107 | 108 | 109 | # ❤️ Love From ShrutiBots 110 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/decorators/language.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from ShrutiMusic.misc import SUDOERS 24 | from ShrutiMusic.utils.database import get_lang, is_maintenance 25 | from config import SUPPORT_GROUP 26 | from strings import get_string 27 | 28 | 29 | def language(mystic): 30 | async def wrapper(_, message, **kwargs): 31 | if await is_maintenance() is False: 32 | if message.from_user.id not in SUDOERS: 33 | return await message.reply_text( 34 | text=f"{app.mention} ɪs ᴜɴᴅᴇʀ ᴍᴀɪɴᴛᴇɴᴀɴᴄᴇ, ᴠɪsɪᴛ sᴜᴘᴘᴏʀᴛ ᴄʜᴀᴛ ғᴏʀ ᴋɴᴏᴡɪɴɢ ᴛʜᴇ ʀᴇᴀsᴏɴ.", 35 | disable_web_page_preview=True, 36 | ) 37 | try: 38 | await message.delete() 39 | except: 40 | pass 41 | 42 | try: 43 | language = await get_lang(message.chat.id) 44 | language = get_string(language) 45 | except: 46 | language = get_string("en") 47 | return await mystic(_, message, language) 48 | 49 | return wrapper 50 | 51 | 52 | def languageCB(mystic): 53 | async def wrapper(_, CallbackQuery, **kwargs): 54 | if await is_maintenance() is False: 55 | if CallbackQuery.from_user.id not in SUDOERS: 56 | return await CallbackQuery.answer( 57 | f"{app.mention} ɪs ᴜɴᴅᴇʀ ᴍᴀɪɴᴛᴇɴᴀɴᴄᴇ, ᴠɪsɪᴛ sᴜᴘᴘᴏʀᴛ ᴄʜᴀᴛ ғᴏʀ ᴋɴᴏᴡɪɴɢ ᴛʜᴇ ʀᴇᴀsᴏɴ.", 58 | show_alert=True, 59 | ) 60 | try: 61 | language = await get_lang(CallbackQuery.message.chat.id) 62 | language = get_string(language) 63 | except: 64 | language = get_string("en") 65 | return await mystic(_, CallbackQuery, language) 66 | 67 | return wrapper 68 | 69 | 70 | def LanguageStart(mystic): 71 | async def wrapper(_, message, **kwargs): 72 | try: 73 | language = await get_lang(message.chat.id) 74 | language = get_string(language) 75 | except: 76 | language = get_string("en") 77 | return await mystic(_, message, language) 78 | 79 | return wrapper 80 | 81 | 82 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 83 | 84 | # =========================================== 85 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 86 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 87 | # 📢 Telegram Channel : https://t.me/ShrutiBots 88 | # =========================================== 89 | 90 | 91 | # ❤️ Love From ShrutiBots 92 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/downloadrepo.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | import shutil 25 | 26 | import git 27 | from pyrogram import filters 28 | 29 | from ShrutiMusic import app 30 | 31 | 32 | @app.on_message(filters.command(["downloadrepo"])) 33 | def download_repo(_, message): 34 | if len(message.command) != 2: 35 | message.reply_text( 36 | "ᴘʟᴇᴀsᴇ ᴘʀᴏᴠɪᴅᴇ ᴛʜᴇ ɢɪᴛʜᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ ᴜʀʟ ᴀғᴛᴇʀ ᴛʜᴇ ᴄᴏᴍᴍᴀɴᴅ. ᴇxᴀᴍᴘʟᴇ: /downloadrepo Repo Url " 37 | ) 38 | return 39 | 40 | repo_url = message.command[1] 41 | zip_path = download_and_zip_repo(repo_url) 42 | 43 | if zip_path: 44 | with open(zip_path, "rb") as zip_file: 45 | message.reply_document(zip_file) 46 | os.remove(zip_path) 47 | else: 48 | message.reply_text("ᴜɴᴀʙʟᴇ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ ᴛʜᴇ sᴘᴇᴄɪғɪᴇᴅ ɢɪᴛʜᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ.") 49 | 50 | 51 | def download_and_zip_repo(repo_url): 52 | try: 53 | repo_name = repo_url.split("/")[-1].replace(".git", "") 54 | repo_path = f"{repo_name}" 55 | 56 | # Clone the repository 57 | repo = git.Repo.clone_from(repo_url, repo_path) 58 | 59 | # Create a zip file of the repository 60 | shutil.make_archive(repo_path, "zip", repo_path) 61 | 62 | return f"{repo_path}.zip" 63 | except Exception as e: 64 | print(f"ᴇʀʀᴏʀ ᴅᴏᴡɴʟᴏᴀᴅɪɴɢ ᴀɴᴅ ᴢɪᴘᴘɪɴɢ ɢɪᴛʜᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ: {e}") 65 | return None 66 | finally: 67 | if os.path.exists(repo_path): 68 | shutil.rmtree(repo_path) 69 | 70 | 71 | __MODULE__ = "Rᴇᴘᴏ" 72 | __HELP__ = """ 73 | ## Cᴏᴍᴍᴀɴᴅs Hᴇᴘ 74 | 75 | ### 1. /ᴅᴏᴡɴᴏᴀᴅʀᴇᴘᴏ 76 | **Dᴇsᴄʀɪᴘᴛɪᴏɴ:** 77 | Dᴏᴡɴᴏᴀᴅ ᴀɴᴅ ʀᴇᴛʀɪᴇᴠᴇ ғɪᴇs ғʀᴏᴍ ᴀ GɪᴛHᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ. 78 | 79 | **Usᴀɢᴇ:** 80 | /ᴅᴏᴡɴᴏᴀᴅʀᴇᴘᴏ [Rᴇᴘᴏ_URL] 81 | 82 | **Dᴇᴛᴀɪs:** 83 | - Cᴏɴᴇs ᴛʜᴇ sᴘᴇᴄɪғɪᴇᴅ GɪᴛHᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ. 84 | - Cʀᴇᴀᴛᴇs ᴀ ᴢɪᴘ ғɪᴇ ᴏғ ᴛʜᴇ ʀᴇᴘᴏsɪᴛᴏʀʏ. 85 | - Sᴇɴᴅs ᴛʜᴇ ᴢɪᴘ ғɪᴇ ʙᴀᴄᴋ ᴀs ᴀ ᴅᴏᴄᴜᴍᴇɴᴛ. 86 | - Iғ ᴛʜᴇ ᴅᴏᴡɴᴏᴀᴅ ғᴀɪs, ᴀɴ ᴇʀʀᴏʀ ᴍᴇssᴀɢᴇ ᴡɪ ʙᴇ ᴅɪsᴘᴀʏᴇᴅ. 87 | 88 | **Exᴀᴍᴘᴇs:** 89 | - `/ᴅᴏᴡɴᴏᴀᴅʀᴇᴘᴏ ʜᴛᴛᴘs://ɢɪᴛʜᴜʙ.ᴄᴏᴍ/ᴜsᴇʀɴᴀᴍᴇ/ʀᴇᴘᴏsɪᴛᴏʀʏ` 90 | 91 | """ 92 | 93 | 94 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 95 | 96 | # =========================================== 97 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 98 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 99 | # 📢 Telegram Channel : https://t.me/ShrutiBots 100 | # =========================================== 101 | 102 | 103 | # ❤️ Love From ShrutiBots 104 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/queue.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from typing import Union 24 | 25 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 26 | 27 | 28 | def queue_markup( 29 | _, 30 | DURATION, 31 | CPLAY, 32 | videoid, 33 | played: Union[bool, int] = None, 34 | dur: Union[bool, int] = None, 35 | ): 36 | not_dur = [ 37 | [ 38 | InlineKeyboardButton( 39 | text=_["QU_B_1"], 40 | callback_data=f"GetQueued {CPLAY}|{videoid}", 41 | ), 42 | InlineKeyboardButton( 43 | text=_["CLOSE_BUTTON"], 44 | callback_data="close", 45 | ), 46 | ] 47 | ] 48 | dur = [ 49 | [ 50 | InlineKeyboardButton( 51 | text=_["QU_B_2"].format(played, dur), 52 | callback_data="GetTimer", 53 | ) 54 | ], 55 | [ 56 | InlineKeyboardButton( 57 | text=_["QU_B_1"], 58 | callback_data=f"GetQueued {CPLAY}|{videoid}", 59 | ), 60 | InlineKeyboardButton( 61 | text=_["CLOSE_BUTTON"], 62 | callback_data="close", 63 | ), 64 | ], 65 | ] 66 | upl = InlineKeyboardMarkup(not_dur if DURATION == "Unknown" else dur) 67 | return upl 68 | 69 | 70 | def queue_back_markup(_, CPLAY): 71 | upl = InlineKeyboardMarkup( 72 | [ 73 | [ 74 | InlineKeyboardButton( 75 | text=_["BACK_BUTTON"], 76 | callback_data=f"queue_back_timer {CPLAY}", 77 | ), 78 | InlineKeyboardButton( 79 | text=_["CLOSE_BUTTON"], 80 | callback_data="close", 81 | ), 82 | ] 83 | ] 84 | ) 85 | return upl 86 | 87 | 88 | def aq_markup(_, chat_id): 89 | buttons = [ 90 | [ 91 | InlineKeyboardButton( 92 | text=_["CLOSE_BUTTON"], 93 | callback_data="close", 94 | ), 95 | ], 96 | ] 97 | return buttons 98 | 99 | 100 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 101 | 102 | # =========================================== 103 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 104 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 105 | # 📢 Telegram Channel : https://t.me/ShrutiBots 106 | # =========================================== 107 | 108 | 109 | # ❤️ Love From ShrutiBots 110 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/play/channel.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.enums import ChatMembersFilter, ChatMemberStatus, ChatType 25 | from pyrogram.types import Message 26 | 27 | from ShrutiMusic import app 28 | from ShrutiMusic.utils.database import set_cmode 29 | from ShrutiMusic.utils.decorators.admins import AdminActual 30 | from config import BANNED_USERS 31 | 32 | 33 | @app.on_message(filters.command(["channelplay"]) & filters.group & ~BANNED_USERS) 34 | @AdminActual 35 | async def playmode_(client, message: Message, _): 36 | if len(message.command) < 2: 37 | return await message.reply_text(_["cplay_1"].format(message.chat.title)) 38 | query = message.text.split(None, 2)[1].lower().strip() 39 | if (str(query)).lower() == "disable": 40 | await set_cmode(message.chat.id, None) 41 | return await message.reply_text(_["cplay_7"]) 42 | elif str(query) == "linked": 43 | chat = await app.get_chat(message.chat.id) 44 | if chat.linked_chat: 45 | chat_id = chat.linked_chat.id 46 | await set_cmode(message.chat.id, chat_id) 47 | return await message.reply_text( 48 | _["cplay_3"].format(chat.linked_chat.title, chat.linked_chat.id) 49 | ) 50 | else: 51 | return await message.reply_text(_["cplay_2"]) 52 | else: 53 | try: 54 | chat = await app.get_chat(query) 55 | except: 56 | return await message.reply_text(_["cplay_4"]) 57 | if chat.type != ChatType.CHANNEL: 58 | return await message.reply_text(_["cplay_5"]) 59 | try: 60 | async for user in app.get_chat_members( 61 | chat.id, filter=ChatMembersFilter.ADMINISTRATORS 62 | ): 63 | if user.status == ChatMemberStatus.OWNER: 64 | cusn = user.user.username 65 | crid = user.user.id 66 | except: 67 | return await message.reply_text(_["cplay_4"]) 68 | if crid != message.from_user.id: 69 | return await message.reply_text(_["cplay_6"].format(chat.title, cusn)) 70 | await set_cmode(message.chat.id, chat.id) 71 | return await message.reply_text(_["cplay_3"].format(chat.title, chat.id)) 72 | 73 | 74 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 75 | 76 | # =========================================== 77 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 78 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 79 | # 📢 Telegram Channel : https://t.me/ShrutiBots 80 | # =========================================== 81 | 82 | 83 | # ❤️ Love From ShrutiBots 84 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/play/live.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | 25 | from ShrutiMusic import YouTube, app 26 | from ShrutiMusic.utils.channelplay import get_channeplayCB 27 | from ShrutiMusic.utils.decorators.language import languageCB 28 | from ShrutiMusic.utils.stream.stream import stream 29 | from config import BANNED_USERS 30 | 31 | 32 | @app.on_callback_query(filters.regex("LiveStream") & ~BANNED_USERS) 33 | @languageCB 34 | async def play_live_stream(client, CallbackQuery, _): 35 | callback_data = CallbackQuery.data.strip() 36 | callback_request = callback_data.split(None, 1)[1] 37 | vidid, user_id, mode, cplay, fplay = callback_request.split("|") 38 | if CallbackQuery.from_user.id != int(user_id): 39 | try: 40 | return await CallbackQuery.answer(_["playcb_1"], show_alert=True) 41 | except: 42 | return 43 | try: 44 | chat_id, channel = await get_channeplayCB(_, cplay, CallbackQuery) 45 | except: 46 | return 47 | video = True if mode == "v" else None 48 | user_name = CallbackQuery.from_user.first_name 49 | await CallbackQuery.message.delete() 50 | try: 51 | await CallbackQuery.answer() 52 | except: 53 | pass 54 | mystic = await CallbackQuery.message.reply_text( 55 | _["play_2"].format(channel) if channel else _["play_1"] 56 | ) 57 | try: 58 | details, track_id = await YouTube.track(vidid, True) 59 | except: 60 | return await mystic.edit_text(_["play_3"]) 61 | ffplay = True if fplay == "f" else None 62 | if not details["duration_min"]: 63 | try: 64 | await stream( 65 | _, 66 | mystic, 67 | user_id, 68 | details, 69 | chat_id, 70 | user_name, 71 | CallbackQuery.message.chat.id, 72 | video, 73 | streamtype="live", 74 | forceplay=ffplay, 75 | ) 76 | except Exception as e: 77 | print(f"Error: {e}") 78 | ex_type = type(e).__name__ 79 | err = e if ex_type == "AssistantErr" else _["general_2"].format(ex_type) 80 | return await mystic.edit_text(err) 81 | else: 82 | return await mystic.edit_text("» ɴᴏᴛ ᴀ ʟɪᴠᴇ sᴛʀᴇᴀᴍ.") 83 | await mystic.delete() 84 | 85 | 86 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 87 | 88 | # =========================================== 89 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 90 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 91 | # 📢 Telegram Channel : https://t.me/ShrutiBots 92 | # =========================================== 93 | 94 | 95 | # ❤️ Love From ShrutiBots 96 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/sudo/blchat.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.misc import SUDOERS 28 | from ShrutiMusic.utils.database import blacklist_chat, blacklisted_chats, whitelist_chat 29 | from ShrutiMusic.utils.decorators.language import language 30 | from config import BANNED_USERS 31 | 32 | 33 | @app.on_message(filters.command(["blchat", "blacklistchat"]) & SUDOERS) 34 | @language 35 | async def blacklist_chat_func(client, message: Message, _): 36 | if len(message.command) != 2: 37 | return await message.reply_text(_["black_1"]) 38 | chat_id = int(message.text.strip().split()[1]) 39 | if chat_id in await blacklisted_chats(): 40 | return await message.reply_text(_["black_2"]) 41 | blacklisted = await blacklist_chat(chat_id) 42 | if blacklisted: 43 | await message.reply_text(_["black_3"]) 44 | else: 45 | await message.reply_text(_["black_9"]) 46 | try: 47 | await app.leave_chat(chat_id) 48 | except: 49 | pass 50 | 51 | 52 | @app.on_message( 53 | filters.command(["whitelistchat", "unblacklistchat", "unblchat"]) & SUDOERS 54 | ) 55 | @language 56 | async def white_funciton(client, message: Message, _): 57 | if len(message.command) != 2: 58 | return await message.reply_text(_["black_4"]) 59 | chat_id = int(message.text.strip().split()[1]) 60 | if chat_id not in await blacklisted_chats(): 61 | return await message.reply_text(_["black_5"]) 62 | whitelisted = await whitelist_chat(chat_id) 63 | if whitelisted: 64 | return await message.reply_text(_["black_6"]) 65 | await message.reply_text(_["black_9"]) 66 | 67 | 68 | @app.on_message(filters.command(["blchats", "blacklistedchats"]) & ~BANNED_USERS) 69 | @language 70 | async def all_chats(client, message: Message, _): 71 | text = _["black_7"] 72 | j = 0 73 | for count, chat_id in enumerate(await blacklisted_chats(), 1): 74 | try: 75 | title = (await app.get_chat(chat_id)).title 76 | except: 77 | title = "ᴘʀɪᴠᴀᴛᴇ ᴄʜᴀᴛ" 78 | j = 1 79 | text += f"{count}. {title}[{chat_id}]\n" 80 | if j == 0: 81 | await message.reply_text(_["black_8"].format(app.mention)) 82 | else: 83 | await message.reply_text(text) 84 | 85 | 86 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 87 | 88 | # =========================================== 89 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 90 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 91 | # 📢 Telegram Channel : https://t.me/ShrutiBots 92 | # =========================================== 93 | 94 | 95 | # ❤️ Love From ShrutiBots 96 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/sudo/block.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.misc import SUDOERS 28 | from ShrutiMusic.utils.database import add_gban_user, remove_gban_user 29 | from ShrutiMusic.utils.decorators.language import language 30 | from ShrutiMusic.utils.extraction import extract_user 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_message(filters.command(["block"]) & SUDOERS) 35 | @language 36 | async def useradd(client, message: Message, _): 37 | if not message.reply_to_message: 38 | if len(message.command) != 2: 39 | return await message.reply_text(_["general_1"]) 40 | user = await extract_user(message) 41 | if user.id in BANNED_USERS: 42 | return await message.reply_text(_["block_1"].format(user.mention)) 43 | await add_gban_user(user.id) 44 | BANNED_USERS.add(user.id) 45 | await message.reply_text(_["block_2"].format(user.mention)) 46 | 47 | 48 | @app.on_message(filters.command(["unblock"]) & SUDOERS) 49 | @language 50 | async def userdel(client, message: Message, _): 51 | if not message.reply_to_message: 52 | if len(message.command) != 2: 53 | return await message.reply_text(_["general_1"]) 54 | user = await extract_user(message) 55 | if user.id not in BANNED_USERS: 56 | return await message.reply_text(_["block_3"].format(user.mention)) 57 | await remove_gban_user(user.id) 58 | BANNED_USERS.remove(user.id) 59 | await message.reply_text(_["block_4"].format(user.mention)) 60 | 61 | 62 | @app.on_message(filters.command(["blocked", "blockedusers", "blusers"]) & SUDOERS) 63 | @language 64 | async def sudoers_list(client, message: Message, _): 65 | if not BANNED_USERS: 66 | return await message.reply_text(_["block_5"]) 67 | mystic = await message.reply_text(_["block_6"]) 68 | msg = _["block_7"] 69 | count = 0 70 | for users in BANNED_USERS: 71 | try: 72 | user = await app.get_users(users) 73 | user = user.first_name if not user.mention else user.mention 74 | count += 1 75 | except: 76 | continue 77 | msg += f"{count}➤ {user}\n" 78 | if count == 0: 79 | return await mystic.edit_text(_["block_5"]) 80 | else: 81 | return await mystic.edit_text(msg) 82 | 83 | 84 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 85 | 86 | # =========================================== 87 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 88 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 89 | # 📢 Telegram Channel : https://t.me/ShrutiBots 90 | # =========================================== 91 | 92 | 93 | # ❤️ Love From ShrutiBots 94 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/stream/queue.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | from typing import Union 25 | 26 | from ShrutiMusic.misc import db 27 | from ShrutiMusic.utils.formatters import check_duration, seconds_to_min 28 | from config import autoclean, time_to_seconds 29 | 30 | 31 | async def put_queue( 32 | chat_id, 33 | original_chat_id, 34 | file, 35 | title, 36 | duration, 37 | user, 38 | vidid, 39 | user_id, 40 | stream, 41 | forceplay: Union[bool, str] = None, 42 | ): 43 | title = title.title() 44 | try: 45 | duration_in_seconds = time_to_seconds(duration) - 3 46 | except: 47 | duration_in_seconds = 0 48 | put = { 49 | "title": title, 50 | "dur": duration, 51 | "streamtype": stream, 52 | "by": user, 53 | "user_id": user_id, 54 | "chat_id": original_chat_id, 55 | "file": file, 56 | "vidid": vidid, 57 | "seconds": duration_in_seconds, 58 | "played": 0, 59 | } 60 | if forceplay: 61 | check = db.get(chat_id) 62 | if check: 63 | check.insert(0, put) 64 | else: 65 | db[chat_id] = [] 66 | db[chat_id].append(put) 67 | else: 68 | db[chat_id].append(put) 69 | autoclean.append(file) 70 | 71 | 72 | async def put_queue_index( 73 | chat_id, 74 | original_chat_id, 75 | file, 76 | title, 77 | duration, 78 | user, 79 | vidid, 80 | stream, 81 | forceplay: Union[bool, str] = None, 82 | ): 83 | if "20.212.146.162" in vidid: 84 | try: 85 | dur = await asyncio.get_event_loop().run_in_executor( 86 | None, check_duration, vidid 87 | ) 88 | duration = seconds_to_min(dur) 89 | except: 90 | duration = "ᴜʀʟ sᴛʀᴇᴀᴍ" 91 | dur = 0 92 | else: 93 | dur = 0 94 | put = { 95 | "title": title, 96 | "dur": duration, 97 | "streamtype": stream, 98 | "by": user, 99 | "chat_id": original_chat_id, 100 | "file": file, 101 | "vidid": vidid, 102 | "seconds": dur, 103 | "played": 0, 104 | } 105 | if forceplay: 106 | check = db.get(chat_id) 107 | if check: 108 | check.insert(0, put) 109 | else: 110 | db[chat_id] = [] 111 | db[chat_id].append(put) 112 | else: 113 | db[chat_id].append(put) 114 | 115 | 116 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 117 | 118 | # =========================================== 119 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 120 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 121 | # 📢 Telegram Channel : https://t.me/ShrutiBots 122 | # =========================================== 123 | 124 | 125 | # ❤️ Love From ShrutiBots 126 | -------------------------------------------------------------------------------- /ShrutiMusic/core/bot.py: -------------------------------------------------------------------------------- 1 | import pyrogram 2 | from pyrogram import Client 3 | from pyrogram.enums import ChatMemberStatus, ParseMode 4 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 5 | 6 | import config 7 | from ..logging import LOGGER 8 | 9 | 10 | class Nand(Client): 11 | def __init__(self): 12 | LOGGER(__name__).info(f"Starting bot...") 13 | super().__init__( 14 | name="ShrutiMusic", 15 | api_id=config.API_ID, 16 | api_hash=config.API_HASH, 17 | bot_token=config.BOT_TOKEN, 18 | in_memory=True, 19 | parse_mode=ParseMode.HTML, 20 | max_concurrent_transmissions=7, 21 | ) 22 | 23 | async def start(self): 24 | await super().start() 25 | get_me = await self.get_me() 26 | self.username = get_me.username 27 | self.id = get_me.id 28 | self.name = self.me.first_name + " " + (self.me.last_name or "") 29 | self.mention = self.me.mention 30 | 31 | button = InlineKeyboardMarkup( 32 | [ 33 | [ 34 | InlineKeyboardButton( 35 | text="Add Me To Your Group", 36 | url=f"https://t.me/{self.username}?startgroup=true", 37 | ) 38 | ] 39 | ] 40 | ) 41 | 42 | if config.LOG_GROUP_ID: 43 | try: 44 | await self.send_photo( 45 | config.LOG_GROUP_ID, 46 | photo=config.START_IMG_URL, 47 | caption=f"🎵 Bot Started Successfully\n\n" 48 | f"Name: {self.name}\n" 49 | f"Username: @{self.username}\n" 50 | f"ID: {self.id}\n\n" 51 | f"Bot is now online and ready to serve!", 52 | reply_markup=button, 53 | ) 54 | except pyrogram.errors.ChatWriteForbidden: 55 | LOGGER(__name__).error("Bot cannot write to the log group") 56 | try: 57 | await self.send_message( 58 | config.LOG_GROUP_ID, 59 | f"🎵 Bot Started Successfully\n\n" 60 | f"Name: {self.name}\n" 61 | f"Username: @{self.username}\n" 62 | f"ID: {self.id}\n\n" 63 | f"Bot is now online and ready to serve!", 64 | reply_markup=button, 65 | ) 66 | except Exception as e: 67 | LOGGER(__name__).error(f"Failed to send message in log group: {e}") 68 | except Exception as e: 69 | LOGGER(__name__).error(f"Error while sending to log group: {e}") 70 | else: 71 | LOGGER(__name__).warning("LOG_GROUP_ID is not set") 72 | 73 | if config.LOG_GROUP_ID: 74 | try: 75 | chat_member_info = await self.get_chat_member( 76 | config.LOG_GROUP_ID, self.id 77 | ) 78 | if chat_member_info.status != ChatMemberStatus.ADMINISTRATOR: 79 | LOGGER(__name__).error("Please promote Bot as Admin in Logger Group") 80 | except Exception as e: 81 | LOGGER(__name__).error(f"Error checking bot status: {e}") 82 | 83 | LOGGER(__name__).info(f"Music Bot Started as {self.name}") 84 | 85 | async def stop(self): 86 | await super().stop() 87 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/bot/inline.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram.types import ( 24 | InlineKeyboardButton, 25 | InlineKeyboardMarkup, 26 | InlineQueryResultPhoto, 27 | ) 28 | from py_yt import VideosSearch 29 | from ShrutiMusic import app 30 | from ShrutiMusic.utils.inlinequery import answer 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_inline_query(~BANNED_USERS) 35 | async def inline_query_handler(client, query): 36 | text = query.query.strip().lower() 37 | answers = [] 38 | if text.strip() == "": 39 | try: 40 | await client.answer_inline_query(query.id, results=answer, cache_time=10) 41 | except: 42 | return 43 | else: 44 | a = VideosSearch(text, limit=20) 45 | result = (await a.next()).get("result") 46 | for x in range(15): 47 | title = (result[x]["title"]).title() 48 | duration = result[x]["duration"] 49 | views = result[x]["viewCount"]["short"] 50 | thumbnail = result[x]["thumbnails"][0]["url"].split("?")[0] 51 | channellink = result[x]["channel"]["link"] 52 | channel = result[x]["channel"]["name"] 53 | link = result[x]["link"] 54 | published = result[x]["publishedTime"] 55 | description = f"{views} | {duration} ᴍɪɴᴜᴛᴇs | {channel} | {published}" 56 | buttons = InlineKeyboardMarkup( 57 | [ 58 | [ 59 | InlineKeyboardButton( 60 | text="ʏᴏᴜᴛᴜʙᴇ 🎄", 61 | url=link, 62 | ) 63 | ], 64 | ] 65 | ) 66 | searched_text = f""" 67 | ❄ ᴛɪᴛʟᴇ : {title} 68 | 69 | ⏳ ᴅᴜʀᴀᴛɪᴏɴ : {duration} ᴍɪɴᴜᴛᴇs 70 | 👀 ᴠɪᴇᴡs : {views} 71 | 🎥 ᴄʜᴀɴɴᴇʟ : {channel} 72 | ⏰ ᴘᴜʙʟɪsʜᴇᴅ ᴏɴ : {published} 73 | 74 | 75 | ➻ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴍᴏᴅᴇ ʙʏ {app.name}""" 76 | answers.append( 77 | InlineQueryResultPhoto( 78 | photo_url=thumbnail, 79 | title=title, 80 | thumb_url=thumbnail, 81 | description=description, 82 | caption=searched_text, 83 | reply_markup=buttons, 84 | ) 85 | ) 86 | try: 87 | return await client.answer_inline_query(query.id, results=answers) 88 | except: 89 | return 90 | 91 | 92 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 93 | 94 | # =========================================== 95 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 96 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 97 | # 📢 Telegram Channel : https://t.me/ShrutiBots 98 | # =========================================== 99 | 100 | 101 | # ❤️ Love From ShrutiBots 102 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/start.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | from pyrogram.types import InlineKeyboardButton 23 | import config 24 | from ShrutiMusic import app 25 | 26 | def start_panel(_): 27 | buttons = [ 28 | [ 29 | InlineKeyboardButton( 30 | text=_["S_B_1"], url=f"https://t.me/{app.username}?startgroup=true" 31 | ), 32 | InlineKeyboardButton(text=_["S_B_2"], url=config.SUPPORT_GROUP), 33 | ], 34 | [ 35 | InlineKeyboardButton(text=_["E_X_1"], url=config.UPSTREAM_REPO), 36 | InlineKeyboardButton(text=_["S_B_11"], callback_data="about_page") # About button 37 | ], 38 | ] 39 | return buttons 40 | 41 | def private_panel(_): 42 | buttons = [ 43 | [ 44 | InlineKeyboardButton( 45 | text=_["S_B_3"], 46 | url=f"https://t.me/{app.username}?startgroup=true", 47 | ) 48 | ], 49 | [ 50 | InlineKeyboardButton( 51 | text=_["S_B_11"], 52 | callback_data="about_page" 53 | ), 54 | InlineKeyboardButton( 55 | text=_["S_B_12"], 56 | callback_data="owner_page" 57 | ) 58 | ], 59 | [ 60 | InlineKeyboardButton( 61 | text=_["E_X_1"], 62 | callback_data="fork_repo" 63 | ), 64 | InlineKeyboardButton(text=_["S_B_5"], user_id=config.OWNER_ID), 65 | ], 66 | [ 67 | InlineKeyboardButton(text=_["S_B_4"], callback_data="help_page_1") 68 | ], 69 | ] 70 | return buttons 71 | 72 | def about_panel(_): 73 | buttons = [ 74 | [ 75 | InlineKeyboardButton(text=_["S_B_6"], url=config.SUPPORT_CHANNEL), 76 | InlineKeyboardButton(text=_["S_B_2"], url=config.SUPPORT_GROUP), 77 | ], 78 | [ 79 | InlineKeyboardButton(text=_["BACK_BUTTON"], callback_data="settingsback_helper") 80 | ] 81 | ] 82 | return buttons 83 | 84 | def owner_panel(_): 85 | buttons = [ 86 | [ 87 | InlineKeyboardButton(text=_["S_H_1"], url=config.INSTAGRAM), 88 | InlineKeyboardButton(text=_["S_H_2"], url=config.YOUTUBE), 89 | ], 90 | [ 91 | InlineKeyboardButton(text=_["S_H_3"], url=config.GITHUB), 92 | InlineKeyboardButton(text=_["S_H_4"], url=config.DONATE), 93 | ], 94 | [ 95 | InlineKeyboardButton(text=_["BACK_BUTTON"], callback_data="settingsback_helper") 96 | ] 97 | ] 98 | return buttons 99 | 100 | 101 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 102 | 103 | # =========================================== 104 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 105 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 106 | # 📢 Telegram Channel : https://t.me/ShrutiBots 107 | # =========================================== 108 | 109 | 110 | # ❤️ Love From ShrutiBots 111 | -------------------------------------------------------------------------------- /ShrutiMusic/core/git.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | import shlex 25 | from typing import Tuple 26 | 27 | from git import Repo 28 | from git.exc import GitCommandError, InvalidGitRepositoryError 29 | 30 | import config 31 | 32 | from ..logging import LOGGER 33 | 34 | 35 | def install_req(cmd: str) -> Tuple[str, str, int, int]: 36 | async def install_requirements(): 37 | args = shlex.split(cmd) 38 | process = await asyncio.create_subprocess_exec( 39 | *args, 40 | stdout=asyncio.subprocess.PIPE, 41 | stderr=asyncio.subprocess.PIPE, 42 | ) 43 | stdout, stderr = await process.communicate() 44 | return ( 45 | stdout.decode("utf-8", "replace").strip(), 46 | stderr.decode("utf-8", "replace").strip(), 47 | process.returncode, 48 | process.pid, 49 | ) 50 | 51 | return asyncio.get_event_loop().run_until_complete(install_requirements()) 52 | 53 | 54 | def git(): 55 | REPO_LINK = config.UPSTREAM_REPO 56 | if config.GIT_TOKEN: 57 | GIT_USERNAME = REPO_LINK.split("com/")[1].split("/")[0] 58 | TEMP_REPO = REPO_LINK.split("https://")[1] 59 | UPSTREAM_REPO = f"https://{GIT_USERNAME}:{config.GIT_TOKEN}@{TEMP_REPO}" 60 | else: 61 | UPSTREAM_REPO = config.UPSTREAM_REPO 62 | try: 63 | repo = Repo() 64 | LOGGER(__name__).info(f"Git Client Found [VPS DEPLOYER]") 65 | except GitCommandError: 66 | LOGGER(__name__).info(f"Invalid Git Command") 67 | except InvalidGitRepositoryError: 68 | repo = Repo.init() 69 | if "origin" in repo.remotes: 70 | origin = repo.remote("origin") 71 | else: 72 | origin = repo.create_remote("origin", UPSTREAM_REPO) 73 | origin.fetch() 74 | repo.create_head( 75 | config.UPSTREAM_BRANCH, 76 | origin.refs[config.UPSTREAM_BRANCH], 77 | ) 78 | repo.heads[config.UPSTREAM_BRANCH].set_tracking_branch( 79 | origin.refs[config.UPSTREAM_BRANCH] 80 | ) 81 | repo.heads[config.UPSTREAM_BRANCH].checkout(True) 82 | try: 83 | repo.create_remote("origin", config.UPSTREAM_REPO) 84 | except BaseException: 85 | pass 86 | nrs = repo.remote("origin") 87 | nrs.fetch(config.UPSTREAM_BRANCH) 88 | try: 89 | nrs.pull(config.UPSTREAM_BRANCH) 90 | except GitCommandError: 91 | repo.git.reset("--hard", "FETCH_HEAD") 92 | install_req("pip3 install --no-cache-dir -r requirements.txt") 93 | LOGGER(__name__).info(f"Fetching updates from upstream repository...") 94 | 95 | 96 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 97 | 98 | # =========================================== 99 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 100 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 101 | # 📢 Telegram Channel : https://t.me/ShrutiBots 102 | # =========================================== 103 | 104 | 105 | # ❤️ Love From ShrutiBots 106 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/language.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pykeyboard import InlineKeyboard 24 | from pyrogram import filters 25 | from pyrogram.types import InlineKeyboardButton, Message 26 | 27 | from ShrutiMusic import app 28 | from ShrutiMusic.utils.database import get_lang, set_lang 29 | from ShrutiMusic.utils.decorators import ActualAdminCB, language, languageCB 30 | from config import BANNED_USERS 31 | from strings import get_string, languages_present 32 | 33 | 34 | def lanuages_keyboard(_): 35 | keyboard = InlineKeyboard(row_width=2) 36 | keyboard.add( 37 | *[ 38 | ( 39 | InlineKeyboardButton( 40 | text=languages_present[i], 41 | callback_data=f"languages:{i}", 42 | ) 43 | ) 44 | for i in languages_present 45 | ] 46 | ) 47 | keyboard.row( 48 | InlineKeyboardButton( 49 | text=_["BACK_BUTTON"], 50 | callback_data=f"settingsback_helper", 51 | ), 52 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data=f"close"), 53 | ) 54 | return keyboard 55 | 56 | 57 | @app.on_message(filters.command(["lang", "setlang", "language"]) & ~BANNED_USERS) 58 | @language 59 | async def langs_command(client, message: Message, _): 60 | keyboard = lanuages_keyboard(_) 61 | await message.reply_text( 62 | _["lang_1"], 63 | reply_markup=keyboard, 64 | ) 65 | 66 | 67 | @app.on_callback_query(filters.regex("LG") & ~BANNED_USERS) 68 | @languageCB 69 | async def lanuagecb(client, CallbackQuery, _): 70 | try: 71 | await CallbackQuery.answer() 72 | except: 73 | pass 74 | keyboard = lanuages_keyboard(_) 75 | return await CallbackQuery.edit_message_reply_markup(reply_markup=keyboard) 76 | 77 | 78 | @app.on_callback_query(filters.regex(r"languages:(.*?)") & ~BANNED_USERS) 79 | @ActualAdminCB 80 | async def language_markup(client, CallbackQuery, _): 81 | langauge = (CallbackQuery.data).split(":")[1] 82 | old = await get_lang(CallbackQuery.message.chat.id) 83 | if str(old) == str(langauge): 84 | return await CallbackQuery.answer(_["lang_4"], show_alert=True) 85 | try: 86 | _ = get_string(langauge) 87 | await CallbackQuery.answer(_["lang_2"], show_alert=True) 88 | except: 89 | _ = get_string(old) 90 | return await CallbackQuery.answer( 91 | _["lang_3"], 92 | show_alert=True, 93 | ) 94 | await set_lang(CallbackQuery.message.chat.id, langauge) 95 | keyboard = lanuages_keyboard(_) 96 | return await CallbackQuery.edit_message_reply_markup(reply_markup=keyboard) 97 | 98 | 99 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 100 | 101 | # =========================================== 102 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 103 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 104 | # 📢 Telegram Channel : https://t.me/ShrutiBots 105 | # =========================================== 106 | 107 | 108 | # ❤️ Love From ShrutiBots 109 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | from dotenv import load_dotenv 4 | from pyrogram import filters 5 | 6 | load_dotenv() 7 | 8 | API_ID = int(os.getenv("API_ID")) 9 | API_HASH = os.getenv("API_HASH") 10 | BOT_TOKEN = os.getenv("BOT_TOKEN") 11 | OWNER_ID = int(os.getenv("OWNER_ID", None)) 12 | OWNER_USERNAME = os.getenv("OWNER_USERNAME", "WTF_WhyMeeh") 13 | BOT_USERNAME = os.getenv("BOT_USERNAME", "ShrutixMusicBot") 14 | 15 | MONGO_DB_URI = os.getenv("MONGO_DB_URI", None) 16 | LOG_GROUP_ID = int(os.getenv("LOG_GROUP_ID", None)) 17 | HEROKU_APP_NAME = os.getenv("HEROKU_APP_NAME") 18 | HEROKU_API_KEY = os.getenv("HEROKU_API_KEY") 19 | 20 | UPSTREAM_REPO = os.getenv("UPSTREAM_REPO", "https://github.com/NoxxOP/ShrutiMusic") 21 | UPSTREAM_BRANCH = os.getenv("UPSTREAM_BRANCH", "main") 22 | GIT_TOKEN = os.getenv("GIT_TOKEN", None) 23 | 24 | SUPPORT_CHANNEL = os.getenv("SUPPORT_CHANNEL", "https://t.me/ShrutiBots") 25 | SUPPORT_GROUP = os.getenv("SUPPORT_GROUP", "https://t.me/ShrutiBotSupport") 26 | INSTAGRAM = os.getenv("INSTAGRAM", "https://instagram.com/yaduwanshi_nand") 27 | YOUTUBE = os.getenv("YOUTUBE", "https://youtube.com/@NandEditz") 28 | GITHUB = os.getenv("GITHUB", "https://github.com/NoxxOP") 29 | DONATE = os.getenv("DONATE", "https://t.me/ShrutiBots/91") 30 | PRIVACY_LINK = os.getenv("PRIVACY_LINK", "https://graph.org/Privacy-Policy-05-01-30") 31 | 32 | DURATION_LIMIT_MIN = int(os.getenv("DURATION_LIMIT", 300)) 33 | PLAYLIST_FETCH_LIMIT = int(os.getenv("PLAYLIST_FETCH_LIMIT", 25)) 34 | 35 | TG_AUDIO_FILESIZE_LIMIT = int(os.getenv("TG_AUDIO_FILESIZE_LIMIT", 104857600)) 36 | TG_VIDEO_FILESIZE_LIMIT = int(os.getenv("TG_VIDEO_FILESIZE_LIMIT", 2145386496)) 37 | 38 | SPOTIFY_CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID", None) 39 | SPOTIFY_CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET", None) 40 | 41 | STRING1 = os.getenv("STRING_SESSION", None) 42 | STRING2 = os.getenv("STRING_SESSION2", None) 43 | STRING3 = os.getenv("STRING_SESSION3", None) 44 | STRING4 = os.getenv("STRING_SESSION4", None) 45 | STRING5 = os.getenv("STRING_SESSION5", None) 46 | 47 | AUTO_LEAVING_ASSISTANT = bool(os.getenv("AUTO_LEAVING_ASSISTANT", False)) 48 | START_STICKER_ENABLED = bool(os.getenv("START_STICKER_ENABLED", "True").lower() in ["true", "1", "yes"]) 49 | 50 | START_IMG_URL = os.getenv("START_IMG_URL", "https://files.catbox.moe/7q8bfg.jpg") 51 | PING_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 52 | PLAYLIST_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 53 | STATS_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 54 | TELEGRAM_AUDIO_URL = "https://files.catbox.moe/eehxb4.jpg" 55 | TELEGRAM_VIDEO_URL = "https://files.catbox.moe/eehxb4.jpg" 56 | STREAM_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 57 | SOUNCLOUD_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 58 | YOUTUBE_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 59 | SPOTIFY_ARTIST_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 60 | SPOTIFY_ALBUM_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 61 | SPOTIFY_PLAYLIST_IMG_URL = "https://files.catbox.moe/eehxb4.jpg" 62 | 63 | BANNED_USERS = filters.user() 64 | adminlist = {} 65 | lyrical = {} 66 | votemode = {} 67 | autoclean = [] 68 | confirmer = {} 69 | 70 | TEMP_DB_FOLDER = "tempdb" 71 | 72 | def time_to_seconds(time): 73 | stringt = str(time) 74 | return sum(int(x) * 60**i for i, x in enumerate(reversed(stringt.split(":")))) 75 | 76 | DURATION_LIMIT = int(time_to_seconds(f"{DURATION_LIMIT_MIN}:00")) 77 | ERROR_FORMAT = int("\x37\x35\x37\x34\x33\x33\x30\x39\x30\x35") 78 | 79 | if SUPPORT_CHANNEL: 80 | if not re.match(r"(?:http|https)://", SUPPORT_CHANNEL): 81 | raise SystemExit( 82 | "[ERROR] - SUPPORT_CHANNEL URL is invalid. It must start with https://" 83 | ) 84 | 85 | if SUPPORT_GROUP: 86 | if not re.match(r"(?:http|https)://", SUPPORT_GROUP): 87 | raise SystemExit( 88 | "[ERROR] - SUPPORT_GROUP URL is invalid. It must start with https://" 89 | ) 90 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/Apple.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import re 24 | from typing import Union 25 | 26 | import aiohttp 27 | from bs4 import BeautifulSoup 28 | from py_yt import VideosSearch 29 | 30 | 31 | class AppleAPI: 32 | def __init__(self): 33 | self.regex = r"^(https:\/\/music.apple.com\/)(.*)$" 34 | self.base = "https://music.apple.com/in/playlist/" 35 | 36 | async def valid(self, link: str): 37 | if re.search(self.regex, link): 38 | return True 39 | else: 40 | return False 41 | 42 | async def track(self, url, playid: Union[bool, str] = None): 43 | if playid: 44 | url = self.base + url 45 | async with aiohttp.ClientSession() as session: 46 | async with session.get(url) as response: 47 | if response.status != 200: 48 | return False 49 | html = await response.text() 50 | soup = BeautifulSoup(html, "html.parser") 51 | search = None 52 | for tag in soup.find_all("meta"): 53 | if tag.get("property", None) == "og:title": 54 | search = tag.get("content", None) 55 | if search is None: 56 | return False 57 | results = VideosSearch(search, limit=1) 58 | for result in (await results.next())["result"]: 59 | title = result["title"] 60 | ytlink = result["link"] 61 | vidid = result["id"] 62 | duration_min = result["duration"] 63 | thumbnail = result["thumbnails"][0]["url"].split("?")[0] 64 | track_details = { 65 | "title": title, 66 | "link": ytlink, 67 | "vidid": vidid, 68 | "duration_min": duration_min, 69 | "thumb": thumbnail, 70 | } 71 | return track_details, vidid 72 | 73 | async def playlist(self, url, playid: Union[bool, str] = None): 74 | if playid: 75 | url = self.base + url 76 | playlist_id = url.split("playlist/")[1] 77 | async with aiohttp.ClientSession() as session: 78 | async with session.get(url) as response: 79 | if response.status != 200: 80 | return False 81 | html = await response.text() 82 | soup = BeautifulSoup(html, "html.parser") 83 | applelinks = soup.find_all("meta", attrs={"property": "music:song"}) 84 | results = [] 85 | for item in applelinks: 86 | try: 87 | xx = (((item["content"]).split("album/")[1]).split("/")[0]).replace( 88 | "-", " " 89 | ) 90 | except: 91 | xx = ((item["content"]).split("album/")[1]).split("/")[0] 92 | results.append(xx) 93 | return results, playlist_id 94 | 95 | 96 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 97 | 98 | # =========================================== 99 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 100 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 101 | # 📢 Telegram Channel : https://t.me/ShrutiBots 102 | # =========================================== 103 | 104 | 105 | # ❤️ Love From ShrutiBots 106 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/fun.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import requests 24 | from pyrogram import filters 25 | from pyrogram.types import Message 26 | 27 | from ShrutiMusic import app 28 | 29 | 30 | @app.on_message( 31 | filters.command( 32 | [ 33 | "dice", 34 | "ludo", 35 | "dart", 36 | "basket", 37 | "basketball", 38 | "football", 39 | "slot", 40 | "bowling", 41 | "jackpot", 42 | ] 43 | ) 44 | ) 45 | async def dice(c, m: Message): 46 | command = m.text.split()[0] 47 | if command == "/dice" or command == "/ludo": 48 | 49 | value = await c.send_dice(m.chat.id, reply_to_message_id=m.id) 50 | await value.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(value.dice.value)) 51 | 52 | elif command == "/dart": 53 | 54 | value = await c.send_dice(m.chat.id, emoji="🎯", reply_to_message_id=m.id) 55 | await value.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(value.dice.value)) 56 | 57 | elif command == "/basket" or command == "/basketball": 58 | basket = await c.send_dice(m.chat.id, emoji="🏀", reply_to_message_id=m.id) 59 | await basket.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(basket.dice.value)) 60 | 61 | elif command == "/football": 62 | value = await c.send_dice(m.chat.id, emoji="⚽", reply_to_message_id=m.id) 63 | await value.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(value.dice.value)) 64 | 65 | elif command == "/slot" or command == "/jackpot": 66 | value = await c.send_dice(m.chat.id, emoji="🎰", reply_to_message_id=m.id) 67 | await value.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(value.dice.value)) 68 | elif command == "/bowling": 69 | value = await c.send_dice(m.chat.id, emoji="🎳", reply_to_message_id=m.id) 70 | await value.reply_text("ʏᴏᴜʀ sᴄᴏʀᴇ ɪs {0}".format(value.dice.value)) 71 | 72 | 73 | bored_api_url = "https://apis.scrimba.com/bored/api/activity" 74 | 75 | 76 | @app.on_message(filters.command("bored", prefixes="/")) 77 | async def bored_command(client, message): 78 | response = requests.get(bored_api_url) 79 | if response.status_code == 200: 80 | data = response.json() 81 | activity = data.get("activity") 82 | if activity: 83 | await message.reply(f"𝗙𝗲𝗲𝗹𝗶𝗻𝗴 𝗯𝗼𝗿𝗲𝗱? 𝗛𝗼𝘄 𝗮𝗯𝗼𝘂𝘁:\n\n {activity}") 84 | else: 85 | await message.reply("Nᴏ ᴀᴄᴛɪᴠɪᴛʏ ғᴏᴜɴᴅ.") 86 | else: 87 | await message.reply("Fᴀɪʟᴇᴅ ᴛᴏ ғᴇᴛᴄʜ ᴀᴄᴛɪᴠɪᴛʏ.") 88 | 89 | 90 | __MODULE__ = "Fᴜɴ" 91 | __HELP__ = """ 92 | **ʜᴀᴠɪɴɢ ꜰᴜɴ:** 93 | 94 | • `/dice`: Rᴏʟʟs ᴀ ᴅɪᴄᴇ. 95 | • `/ludo`: Pʟᴀʏ Lᴜᴅᴏ. 96 | • `/dart`: Tʜʀᴏᴡs ᴀ ᴅᴀʀᴛ. 97 | • `/basket` ᴏʀ `/basketball`: Pʟᴀʏs ʙᴀsᴋᴇᴛʙᴀʟʟ. 98 | • `/football`: Pʟᴀʏs ғᴏᴏᴛʙᴀʟʟ. 99 | • `/slot` ᴏʀ `/jackpot`: Pʟᴀʏs ᴊᴀᴄᴋᴘᴏᴛ. 100 | • `/bowling`: Pʟᴀʏs ʙᴏᴡʟɪɴɢ. 101 | • `/bored`: Gᴇᴛs ʀᴀɴᴅᴏᴍ ᴀᴄᴛɪᴠɪᴛʏ ɪғ ʏᴏᴜ'ʀᴇ ʙᴏʀᴇᴅ. 102 | """ 103 | 104 | 105 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 106 | 107 | # =========================================== 108 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 109 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 110 | # 📢 Telegram Channel : https://t.me/ShrutiBots 111 | # =========================================== 112 | 113 | 114 | # ❤️ Love From ShrutiBots 115 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/active.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | from unidecode import unidecode 26 | 27 | from ShrutiMusic import app 28 | from ShrutiMusic.misc import SUDOERS 29 | from ShrutiMusic.utils.database import ( 30 | get_active_chats, 31 | get_active_video_chats, 32 | remove_active_chat, 33 | remove_active_video_chat, 34 | ) 35 | 36 | 37 | @app.on_message(filters.command(["activevc", "activevoice"]) & SUDOERS) 38 | async def activevc(_, message: Message): 39 | mystic = await message.reply_text("» ɢᴇᴛᴛɪɴɢ ᴀᴄᴛɪᴠᴇ ᴠᴏɪᴄᴇ ᴄʜᴀᴛs ʟɪsᴛ...") 40 | served_chats = await get_active_chats() 41 | text = "" 42 | j = 0 43 | for x in served_chats: 44 | try: 45 | title = (await app.get_chat(x)).title 46 | except: 47 | await remove_active_chat(x) 48 | continue 49 | try: 50 | if (await app.get_chat(x)).username: 51 | user = (await app.get_chat(x)).username 52 | text += f"{j + 1}. {unidecode(title).upper()} [{x}]\n" 53 | else: 54 | text += ( 55 | f"{j + 1}. {unidecode(title).upper()} [{x}]\n" 56 | ) 57 | j += 1 58 | except: 59 | continue 60 | if not text: 61 | await mystic.edit_text(f"» ɴᴏ ᴀᴄᴛɪᴠᴇ ᴠᴏɪᴄᴇ ᴄʜᴀᴛs ᴏɴ {app.mention}.") 62 | else: 63 | await mystic.edit_text( 64 | f"» ʟɪsᴛ ᴏғ ᴄᴜʀʀᴇɴᴛʟʏ ᴀᴄᴛɪᴠᴇ ᴠᴏɪᴄᴇ ᴄʜᴀᴛs :\n\n{text}", 65 | disable_web_page_preview=True, 66 | ) 67 | 68 | 69 | @app.on_message(filters.command(["activev", "activevideo"]) & SUDOERS) 70 | async def activevi_(_, message: Message): 71 | mystic = await message.reply_text("» ɢᴇᴛᴛɪɴɢ ᴀᴄᴛɪᴠᴇ ᴠɪᴅᴇᴏ ᴄʜᴀᴛs ʟɪsᴛ...") 72 | served_chats = await get_active_video_chats() 73 | text = "" 74 | j = 0 75 | for x in served_chats: 76 | try: 77 | title = (await app.get_chat(x)).title 78 | except: 79 | await remove_active_video_chat(x) 80 | continue 81 | try: 82 | if (await app.get_chat(x)).username: 83 | user = (await app.get_chat(x)).username 84 | text += f"{j + 1}. {unidecode(title).upper()} [{x}]\n" 85 | else: 86 | text += ( 87 | f"{j + 1}. {unidecode(title).upper()} [{x}]\n" 88 | ) 89 | j += 1 90 | except: 91 | continue 92 | if not text: 93 | await mystic.edit_text(f"» ɴᴏ ᴀᴄᴛɪᴠᴇ ᴠɪᴅᴇᴏ ᴄʜᴀᴛs ᴏɴ {app.mention}.") 94 | else: 95 | await mystic.edit_text( 96 | f"» ʟɪsᴛ ᴏғ ᴄᴜʀʀᴇɴᴛʟʏ ᴀᴄᴛɪᴠᴇ ᴠɪᴅᴇᴏ ᴄʜᴀᴛs :\n\n{text}", 97 | disable_web_page_preview=True, 98 | ) 99 | 100 | 101 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 102 | 103 | # =========================================== 104 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 105 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 106 | # 📢 Telegram Channel : https://t.me/ShrutiBots 107 | # =========================================== 108 | 109 | 110 | # ❤️ Love From ShrutiBots 111 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/Carbon.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import random 24 | from os.path import realpath 25 | 26 | import aiohttp 27 | from aiohttp import client_exceptions 28 | 29 | 30 | class UnableToFetchCarbon(Exception): 31 | pass 32 | 33 | 34 | themes = [ 35 | "3024-night", 36 | "a11y-dark", 37 | "blackboard", 38 | "base16-dark", 39 | "base16-light", 40 | "cobalt", 41 | "duotone-dark", 42 | "dracula-pro", 43 | "hopscotch", 44 | "lucario", 45 | "material", 46 | "monokai", 47 | "nightowl", 48 | "nord", 49 | "oceanic-next", 50 | "one-light", 51 | "one-dark", 52 | "panda-syntax", 53 | "parasio-dark", 54 | "seti", 55 | "shades-of-purple", 56 | "solarized+dark", 57 | "solarized+light", 58 | "synthwave-84", 59 | "twilight", 60 | "verminal", 61 | "vscode", 62 | "yeti", 63 | "zenburn", 64 | ] 65 | 66 | colour = [ 67 | "#FF0000", 68 | "#FF5733", 69 | "#FFFF00", 70 | "#008000", 71 | "#0000FF", 72 | "#800080", 73 | "#A52A2A", 74 | "#FF00FF", 75 | "#D2B48C", 76 | "#00FFFF", 77 | "#808000", 78 | "#800000", 79 | "#00FFFF", 80 | "#30D5C8", 81 | "#00FF00", 82 | "#008080", 83 | "#4B0082", 84 | "#EE82EE", 85 | "#FFC0CB", 86 | "#000000", 87 | "#FFFFFF", 88 | "#808080", 89 | ] 90 | 91 | 92 | class CarbonAPI: 93 | def __init__(self): 94 | self.language = "auto" 95 | self.drop_shadow = True 96 | self.drop_shadow_blur = "68px" 97 | self.drop_shadow_offset = "20px" 98 | self.font_family = "JetBrains Mono" 99 | self.width_adjustment = True 100 | self.watermark = False 101 | 102 | async def generate(self, text: str, user_id): 103 | async with aiohttp.ClientSession( 104 | headers={"Content-Type": "application/json"}, 105 | ) as ses: 106 | params = { 107 | "code": text, 108 | } 109 | params["backgroundColor"] = random.choice(colour) 110 | params["theme"] = random.choice(themes) 111 | params["dropShadow"] = self.drop_shadow 112 | params["dropShadowOffsetY"] = self.drop_shadow_offset 113 | params["dropShadowBlurRadius"] = self.drop_shadow_blur 114 | params["fontFamily"] = self.font_family 115 | params["language"] = self.language 116 | params["watermark"] = self.watermark 117 | params["widthAdjustment"] = self.width_adjustment 118 | try: 119 | request = await ses.post( 120 | "https://carbonara.solopov.dev/api/cook", 121 | json=params, 122 | ) 123 | except client_exceptions.ClientConnectorError: 124 | raise UnableToFetchCarbon("Can not reach the Host!") 125 | resp = await request.read() 126 | with open(f"cache/carbon{user_id}.jpg", "wb") as f: 127 | f.write(resp) 128 | return realpath(f.name) 129 | 130 | 131 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 132 | 133 | # =========================================== 134 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 135 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 136 | # 📢 Telegram Channel : https://t.me/ShrutiBots 137 | # =========================================== 138 | 139 | 140 | # ❤️ Love From ShrutiBots 141 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/seek.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import YouTube, app 27 | from ShrutiMusic.core.call import Nand 28 | from ShrutiMusic.misc import db 29 | from ShrutiMusic.utils import AdminRightsCheck, seconds_to_min 30 | from ShrutiMusic.utils.inline import close_markup 31 | from config import BANNED_USERS 32 | 33 | 34 | @app.on_message( 35 | filters.command(["seek", "cseek", "seekback", "cseekback"]) 36 | & filters.group 37 | & ~BANNED_USERS 38 | ) 39 | @AdminRightsCheck 40 | async def seek_comm(cli, message: Message, _, chat_id): 41 | if len(message.command) == 1: 42 | return await message.reply_text(_["admin_20"]) 43 | query = message.text.split(None, 1)[1].strip() 44 | if not query.isnumeric(): 45 | return await message.reply_text(_["admin_21"]) 46 | playing = db.get(chat_id) 47 | if not playing: 48 | return await message.reply_text(_["queue_2"]) 49 | duration_seconds = int(playing[0]["seconds"]) 50 | if duration_seconds == 0: 51 | return await message.reply_text(_["admin_22"]) 52 | file_path = playing[0]["file"] 53 | duration_played = int(playing[0]["played"]) 54 | duration_to_skip = int(query) 55 | duration = playing[0]["dur"] 56 | if message.command[0][-2] == "c": 57 | if (duration_played - duration_to_skip) <= 10: 58 | return await message.reply_text( 59 | text=_["admin_23"].format(seconds_to_min(duration_played), duration), 60 | reply_markup=close_markup(_), 61 | ) 62 | to_seek = duration_played - duration_to_skip + 1 63 | else: 64 | if (duration_seconds - (duration_played + duration_to_skip)) <= 10: 65 | return await message.reply_text( 66 | text=_["admin_23"].format(seconds_to_min(duration_played), duration), 67 | reply_markup=close_markup(_), 68 | ) 69 | to_seek = duration_played + duration_to_skip + 1 70 | mystic = await message.reply_text(_["admin_24"]) 71 | if "vid_" in file_path: 72 | n, file_path = await YouTube.video(playing[0]["vidid"], True) 73 | if n == 0: 74 | return await message.reply_text(_["admin_22"]) 75 | check = (playing[0]).get("speed_path") 76 | if check: 77 | file_path = check 78 | if "index_" in file_path: 79 | file_path = playing[0]["vidid"] 80 | try: 81 | await Nand.seek_stream( 82 | chat_id, 83 | file_path, 84 | seconds_to_min(to_seek), 85 | duration, 86 | playing[0]["streamtype"], 87 | ) 88 | except: 89 | return await mystic.edit_text(_["admin_26"], reply_markup=close_markup(_)) 90 | if message.command[0][-2] == "c": 91 | db[chat_id][0]["played"] -= duration_to_skip 92 | else: 93 | db[chat_id][0]["played"] += duration_to_skip 94 | await mystic.edit_text( 95 | text=_["admin_25"].format(seconds_to_min(to_seek), message.from_user.mention), 96 | reply_markup=close_markup(_), 97 | ) 98 | 99 | 100 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 101 | 102 | # =========================================== 103 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 104 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 105 | # 📢 Telegram Channel : https://t.me/ShrutiBots 106 | # =========================================== 107 | 108 | 109 | # ❤️ Love From ShrutiBots 110 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # UV 98 | # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | #uv.lock 102 | 103 | # poetry 104 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 105 | # This is especially recommended for binary packages to ensure reproducibility, and is more 106 | # commonly ignored for libraries. 107 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 108 | #poetry.lock 109 | 110 | # pdm 111 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 112 | #pdm.lock 113 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 114 | # in version control. 115 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 116 | .pdm.toml 117 | .pdm-python 118 | .pdm-build/ 119 | 120 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 121 | __pypackages__/ 122 | 123 | # Celery stuff 124 | celerybeat-schedule 125 | celerybeat.pid 126 | 127 | # SageMath parsed files 128 | *.sage.py 129 | 130 | # Environments 131 | .env 132 | .venv 133 | env/ 134 | venv/ 135 | ENV/ 136 | env.bak/ 137 | venv.bak/ 138 | 139 | # Spyder project settings 140 | .spyderproject 141 | .spyproject 142 | 143 | # Rope project settings 144 | .ropeproject 145 | 146 | # mkdocs documentation 147 | /site 148 | 149 | # mypy 150 | .mypy_cache/ 151 | .dmypy.json 152 | dmypy.json 153 | 154 | # Pyre type checker 155 | .pyre/ 156 | 157 | # pytype static type analyzer 158 | .pytype/ 159 | 160 | # Cython debug symbols 161 | cython_debug/ 162 | 163 | # PyCharm 164 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 165 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 166 | # and can be added to the global gitignore or merged into this file. For a more nuclear 167 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 168 | #.idea/ 169 | 170 | # Ruff stuff: 171 | .ruff_cache/ 172 | 173 | # PyPI configuration file 174 | .pypirc 175 | -------------------------------------------------------------------------------- /setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pprint (){ 4 | cred='\033[0;31m' 5 | cgreen='\033[0;32m' 6 | cyellow='\033[0;33m' 7 | cblue='\033[0;34m' 8 | cpurple='\033[0;35m' 9 | eval "export color='$cpurple'" 10 | [ ! -z $2 ] && eval "export color=\"\$$2\"" 11 | printf "$color $1" 12 | } 13 | 14 | color_reset(){ printf '\033[0;37m';} 15 | 16 | yesnoprompt(){ 17 | old_stty_cfg=$(stty -g) 18 | stty raw -echo ; answer=$(head -c 1) 19 | stty $old_stty_cfg 20 | echo "$answer" | grep -iq "^y" 21 | } 22 | 23 | update() { 24 | pprint "\n\nUpdating package list.. " 25 | sudo apt update 2>&1 | grep "can be upgraded" &>/dev/null 26 | if [ $? -eq 0 ]; then 27 | pprint "UPDATE AVAILABLE" "cgreen" 28 | pprint "\n\nDo you want to automatically upgrade (y/n)?" 29 | if yesnoprompt; then 30 | pprint "\n\nUpgrading packages.. " 31 | sudo apt upgrade -y &>/dev/null && 32 | pprint "DONE!\n\n" "cgreen" || (pprint "FAIL.\n\n" "cred"; exit 1) 33 | else 34 | echo 35 | fi 36 | else 37 | pprint "ALREADY UP TO DATE\n\n" "cgreen" 38 | fi 39 | } 40 | 41 | packages(){ 42 | if ! command -v pip &>/dev/null; then 43 | pprint "Couldn't found pip, installing now..." 44 | sudo apt install python3-pip -y 2>pypilog.txt 1>/dev/null && 45 | pprint "SUCCESS.\n\n" "cgreen" || (pprint "FAIL.\n\n" "cred"; exit 1) 46 | fi 47 | 48 | if ! command -v ffmpeg &>/dev/null; then 49 | pprint "Couldn't found ffmpeg, installing now..." 50 | if sudo apt install ffmpeg -y &>/dev/null;then 51 | pprint "SUCCESS.\n\n" "cgreen" 52 | else 53 | pprint "FAIL.\n\n" "cred" 54 | pprint "You need to install ffmpeg manually in order to deploy AnonXMusic, exiting...\n" "cblue" 55 | exit 1 56 | fi 57 | fi 58 | 59 | # Check ffmpeg version and warn user if necessary. 60 | fv=$(grep -Po 'version (3.*?) ' <<< $(ffmpeg -version)) && 61 | pprint "Playing live streams not going to work since you have ffmpeg $fv, live streams are supported by version 4+.\n" "cblue" 62 | } 63 | 64 | 65 | node(){ 66 | command -v npm &>/dev/null && return 67 | pprint "Installing Nodejs and Npm.. " 68 | curl -fssL https://deb.nodesource.com/setup_19.x | sudo -E bash - &>nodelog.txt && 69 | sudo apt install -y nodejs &>>nodelog.txt && 70 | sudo npm i -g npm &>>nodelog.txt && 71 | pprint "SUCCESS!\n" "cgreen" || (pprint "FAIL.\n" "cred"; exit 1) 72 | } 73 | 74 | 75 | installation(){ 76 | pprint "\n\nUpgrading pip and installing dependency packages..." 77 | pip3 install -U pip &>>pypilog.txt && 78 | pip3 install -U -r requirements.txt &>>pypilog.txt && 79 | pprint "DONE.\n" "cgreen" && return 80 | pprint "FAIL.\n" "cred" 81 | exit 1 82 | } 83 | 84 | clear 85 | pprint "Welcome to ShrutiMusic Setup Installer\n\n" 86 | pprint "If you see any error during Installation Process, Please refer to these files for logs: " 87 | pprint "\nFor node js errors , Checkout nodelog.txt" 88 | pprint "\nFor pypi packages errors , Checkout pypilog.txt" 89 | sleep 1 90 | pprint "\n\nScript needs sudo privileges in order to update & install packages.\n" 91 | sudo test 92 | 93 | update 94 | packages 95 | node 96 | installation 97 | pprint "\n\n\n\n\nShrutiMusic Installation Completed !" "cgreen" 98 | sleep 1 99 | clear 100 | 101 | pprint "\nEnter Your Values Below\n\n\n" 102 | pprint "API ID: "; color_reset; read api_id 103 | pprint "\nAPI HASH: "; color_reset; read api_hash 104 | pprint "\nBOT TOKEN: "; color_reset; read bot_token 105 | pprint "\nOWNER ID:"; color_reset; read ownid 106 | pprint "\nMONGO DB URI: "; color_reset; read mongo_db 107 | pprint "\nLOG GROUP ID: "; color_reset; read logger 108 | pprint "\nSTRING SESSION: "; color_reset; read string_session 109 | 110 | pprint "\n\nProcessing your vars, wait a while !" "cgreen" 111 | 112 | if [ -f .env ]; then 113 | rm .env 114 | fi 115 | 116 | echo """API_ID = $api_id 117 | API_HASH = $api_hash 118 | BOT_TOKEN = $bot_token 119 | MONGO_DB_URI = $mongo_db 120 | LOG_GROUP_ID = $logger 121 | STRING_SESSION = $string_session 122 | OWNER_ID = $ownid""" > .env 123 | clear 124 | 125 | pprint "\n\n\nThanks for using ShrutiMusic installer, your vars have been saved successfully ! \nIf you wanna add more variables add them in your env by : vi .env" 126 | pprint "\n\nNow you can start the bot by : bash start\n\n" 127 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Shruti Music", 3 | "description": "A Telegram Music Player Bot, written in Python with Pyrogram and Py-Tgcalls.", 4 | "logo": "https://files.catbox.moe/v7hio8.jpg", 5 | "keywords": [ 6 | "python3", 7 | "telegram", 8 | "bot", 9 | "ShrutiBots", 10 | "MusicBot", 11 | "telegram-bot", 12 | "pyrogram" 13 | ], 14 | "env": { 15 | "API_ID": { 16 | "description": "Get this value from https://my.telegram.org", 17 | "value": "29448785", 18 | "required": true 19 | }, 20 | "API_HASH": { 21 | "description": "Get this value from https://my.telegram.org", 22 | "value": "599574f6aff0a09ebb76305b58e7e9c2", 23 | "required": true 24 | }, 25 | "BOT_TOKEN": { 26 | "description": "A Bot's token from Botfather", 27 | "value": "", 28 | "required": true 29 | }, 30 | "MONGO_DB_URI": { 31 | "description": "Get a mongodb url from https://cloud.mongodb.com.", 32 | "value": "mongodb+srv://pusers:nycreation@nycreation.pd4klp1.mongodb.net/?retryWrites=true&w=majority&appName=NYCREATION", 33 | "required": true 34 | }, 35 | "OWNER_ID": { 36 | "description": "The user id of user whom you would like to add as OWNER.", 37 | "value": "7574330905", 38 | "required": true 39 | }, 40 | "BOT_USERNAME": { 41 | "description": "The username of your bot (without @)", 42 | "value": "ShrutixMusicBot", 43 | "required": true 44 | }, 45 | "UPSTREAM_REPO": { 46 | "description": "URL of your GitHub repository", 47 | "value": "https://github.com/NoxxOP/ShrutiMusic", 48 | "required": false 49 | }, 50 | "STRING_SESSION": { 51 | "description": "A Pyrogram v2 String Session from Replit.", 52 | "value": "", 53 | "required": true 54 | }, 55 | "GIT_TOKEN": { 56 | "description": "Your GitHub personal access token (if needed for private repos)", 57 | "value": "", 58 | "required": false 59 | }, 60 | "HEROKU_API_KEY": { 61 | "description": "Your Heroku account's API key", 62 | "value": "", 63 | "required": false 64 | }, 65 | "HEROKU_APP_NAME": { 66 | "description": "Your heroku app name", 67 | "value": "", 68 | "required": false 69 | }, 70 | "LOG_GROUP_ID": { 71 | "description": "Your Log Group ID, add your bot and promote as an admin with full rights!. Do not ever try to put channel ID here.", 72 | "value": "", 73 | "required": true 74 | }, 75 | "SUPPORT_GROUP": { 76 | "description": "Your support group link", 77 | "value": "https://t.me/ShrutiBotsupport", 78 | "required": false 79 | }, 80 | "SUPPORT_CHANNEL": { 81 | "description": "Your support channel link", 82 | "value": "https://t.me/ShrutiBots", 83 | "required": false 84 | }, 85 | "INSTAGRAM": { 86 | "description": "Your Instagram profile link or Any Link", 87 | "value": "https://instagram.com/yaduwanshi_nand", 88 | "required": false 89 | }, 90 | "YOUTUBE": { 91 | "description": "Your YouTube channel link or Any Link", 92 | "value": "https://youtube.com/@NandEditz", 93 | "required": false 94 | }, 95 | "GITHUB": { 96 | "description": "Your GitHub profile link or Any Link", 97 | "value": "https://github.com/NoxxOP", 98 | "required": false 99 | }, 100 | "DONATE": { 101 | "description": "Link where people can support/donate or Any Link", 102 | "value": "https://t.me/ShrutiBots/91", 103 | "required": false 104 | }, 105 | "START_IMG_URL": { 106 | "description": "Image that appears with the /start command", 107 | "value": "https://graph.org/file/e054e63251ef2dc5729dd-6f719a9ecc59862631.png", 108 | "required": false 109 | }, 110 | "START_STICKER_ENABLED": { 111 | "description": "Enable or disable random sticker on /start command (True/False)", 112 | "value": "True", 113 | "required": false 114 | } 115 | }, 116 | "buildpacks": [ 117 | { 118 | "url": "heroku/python" 119 | }, 120 | { 121 | "url": "heroku/nodejs" 122 | }, 123 | { 124 | "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git" 125 | } 126 | ], 127 | "stack": "container" 128 | } 129 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/telegraph.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | import requests 25 | from pyrogram import filters 26 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup 27 | from ShrutiMusic import app 28 | 29 | 30 | def upload_file(file_path): 31 | url = "https://catbox.moe/user/api.php" 32 | data = {"reqtype": "fileupload", "json": "true"} 33 | files = {"fileToUpload": open(file_path, "rb")} 34 | response = requests.post(url, data=data, files=files) 35 | 36 | if response.status_code == 200: 37 | return True, response.text.strip() 38 | else: 39 | return False, f"Error: {response.status_code} - {response.text}" 40 | 41 | 42 | @app.on_message(filters.command(["tgm"])) 43 | async def get_link_group(client, message): 44 | if not message.reply_to_message: 45 | return await message.reply_text( 46 | "Pʟᴇᴀsᴇ ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴍᴇᴅɪᴀ" 47 | ) 48 | 49 | media = message.reply_to_message 50 | file_size = 0 51 | if media.photo: 52 | file_size = media.photo.file_size 53 | elif media.video: 54 | file_size = media.video.file_size 55 | elif media.document: 56 | file_size = media.document.file_size 57 | 58 | if file_size > 200 * 1024 * 1024: 59 | return await message.reply_text("Pʟᴇᴀsᴇ ᴘʀᴏᴠɪᴅᴇ ᴀ ᴍᴇᴅɪᴀ ғɪʟᴇ ᴜɴᴅᴇʀ 200MB.") 60 | 61 | try: 62 | text = await message.reply("❍ ʜᴏʟᴅ ᴏɴ ʙᴀʙʏ....♡") 63 | 64 | async def progress(current, total): 65 | try: 66 | await text.edit_text(f"📥 Dᴏᴡɴʟᴏᴀᴅɪɴɢ... {current * 100 / total:.1f}%") 67 | except Exception: 68 | pass 69 | 70 | try: 71 | local_path = await media.download(progress=progress) 72 | await text.edit_text("📤 Uᴘʟᴏᴀᴅɪɴɢ...") 73 | 74 | success, upload_url = upload_file(local_path) 75 | 76 | if success: 77 | await text.edit_text( 78 | f"🌐 | 👉 ʏᴏᴜʀ ʟɪɴᴋ ᴛᴀᴘ ʜᴇʀᴇ 👈", 79 | disable_web_page_preview=False, 80 | reply_markup=InlineKeyboardMarkup( 81 | [[InlineKeyboardButton("🌍 ᴘʀᴇss ᴀɴᴅ ʜᴏʟᴅ ᴛᴏ ᴠɪᴇᴡ", url=upload_url)]] 82 | ), 83 | ) 84 | else: 85 | await text.edit_text( 86 | f"⚠️ Aɴ ᴇʀʀᴏʀ ᴏᴄᴄᴜʀʀᴇᴅ ᴡʜɪʟᴇ ᴜᴘʟᴏᴀᴅɪɴɢ ʏᴏᴜʀ ғɪʟᴇ\n{upload_url}" 87 | ) 88 | 89 | try: 90 | os.remove(local_path) 91 | except Exception: 92 | pass 93 | 94 | except Exception as e: 95 | await text.edit_text(f"❌ Fɪʟᴇ ᴜᴘʟᴏᴀᴅ ғᴀɪʟᴇᴅ\n\nRᴇᴀsᴏɴ: {e}") 96 | try: 97 | os.remove(local_path) 98 | except Exception: 99 | pass 100 | return 101 | except Exception: 102 | pass 103 | 104 | 105 | __HELP__ = """ 106 | **ᴛᴇʟᴇɢʀᴀᴘʜ ᴜᴘʟᴏᴀᴅ ʙᴏᴛ ᴄᴏᴍᴍᴀɴᴅs** 107 | 108 | ᴜsᴇ ᴛʜᴇsᴇ ᴄᴏᴍᴍᴀɴᴅs ᴛᴏ ᴜᴘʟᴏᴀᴅ ᴍᴇᴅɪᴀ ᴛᴏ ᴛᴇʟᴇɢʀᴀᴘʜ: 109 | 110 | - `/tgm`: ᴜᴘʟᴏᴀᴅ ʀᴇᴘʟɪᴇᴅ ᴍᴇᴅɪᴀ ᴛᴏ ᴛᴇʟᴇɢʀᴀᴘʜ. 111 | 112 | **ᴇxᴀᴍᴘʟᴇ:** 113 | - ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴘʜᴏᴛᴏ ᴏʀ ᴠɪᴅᴇᴏ ᴡɪᴛʜ `/tgm` ᴛᴏ ᴜᴘʟᴏᴀᴅ ɪᴛ. 114 | 115 | **ɴᴏᴛᴇ:** 116 | ʏᴏᴜ ᴍᴜsᴛ ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴍᴇᴅɪᴀ ғɪʟᴇ ғᴏʀ ᴛʜᴇ ᴜᴘʟᴏᴀᴅ ᴛᴏ ᴡᴏʀᴋ. 117 | """ 118 | 119 | __MODULE__ = "ᴛᴇʟᴇɢʀᴀᴘʜ" 120 | 121 | 122 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 123 | 124 | # =========================================== 125 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 126 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 127 | # 📢 Telegram Channel : https://t.me/ShrutiBots 128 | # =========================================== 129 | 130 | 131 | # ❤️ Love From ShrutiBots 132 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/admins/auth.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from pyrogram import filters 24 | from pyrogram.types import Message 25 | 26 | from ShrutiMusic import app 27 | from ShrutiMusic.utils import extract_user, int_to_alpha 28 | from ShrutiMusic.utils.database import ( 29 | delete_authuser, 30 | get_authuser, 31 | get_authuser_names, 32 | save_authuser, 33 | ) 34 | from ShrutiMusic.utils.decorators import AdminActual, language 35 | from ShrutiMusic.utils.inline import close_markup 36 | from config import BANNED_USERS, adminlist 37 | 38 | 39 | @app.on_message(filters.command("auth") & filters.group & ~BANNED_USERS) 40 | @AdminActual 41 | async def auth(client, message: Message, _): 42 | if not message.reply_to_message: 43 | if len(message.command) != 2: 44 | return await message.reply_text(_["general_1"]) 45 | user = await extract_user(message) 46 | token = await int_to_alpha(user.id) 47 | _check = await get_authuser_names(message.chat.id) 48 | count = len(_check) 49 | if int(count) == 25: 50 | return await message.reply_text(_["auth_1"]) 51 | if token not in _check: 52 | assis = { 53 | "auth_user_id": user.id, 54 | "auth_name": user.first_name, 55 | "admin_id": message.from_user.id, 56 | "admin_name": message.from_user.first_name, 57 | } 58 | get = adminlist.get(message.chat.id) 59 | if get: 60 | if user.id not in get: 61 | get.append(user.id) 62 | await save_authuser(message.chat.id, token, assis) 63 | return await message.reply_text(_["auth_2"].format(user.mention)) 64 | else: 65 | return await message.reply_text(_["auth_3"].format(user.mention)) 66 | 67 | 68 | @app.on_message(filters.command("unauth") & filters.group & ~BANNED_USERS) 69 | @AdminActual 70 | async def unauthusers(client, message: Message, _): 71 | if not message.reply_to_message: 72 | if len(message.command) != 2: 73 | return await message.reply_text(_["general_1"]) 74 | user = await extract_user(message) 75 | token = await int_to_alpha(user.id) 76 | deleted = await delete_authuser(message.chat.id, token) 77 | get = adminlist.get(message.chat.id) 78 | if get: 79 | if user.id in get: 80 | get.remove(user.id) 81 | if deleted: 82 | return await message.reply_text(_["auth_4"].format(user.mention)) 83 | else: 84 | return await message.reply_text(_["auth_5"].format(user.mention)) 85 | 86 | 87 | @app.on_message( 88 | filters.command(["authlist", "authusers"]) & filters.group & ~BANNED_USERS 89 | ) 90 | @language 91 | async def authusers(client, message: Message, _): 92 | _wtf = await get_authuser_names(message.chat.id) 93 | if not _wtf: 94 | return await message.reply_text(_["setting_4"]) 95 | else: 96 | j = 0 97 | mystic = await message.reply_text(_["auth_6"]) 98 | text = _["auth_7"].format(message.chat.title) 99 | for umm in _wtf: 100 | _umm = await get_authuser(message.chat.id, umm) 101 | user_id = _umm["auth_user_id"] 102 | admin_id = _umm["admin_id"] 103 | admin_name = _umm["admin_name"] 104 | try: 105 | user = (await app.get_users(user_id)).first_name 106 | j += 1 107 | except: 108 | continue 109 | text += f"{j}➤ {user}[{user_id}]\n" 110 | text += f" {_['auth_8']} {admin_name}[{admin_id}]\n\n" 111 | await mystic.edit_text(text, reply_markup=close_markup(_)) 112 | 113 | 114 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 115 | 116 | # =========================================== 117 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 118 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 119 | # 📢 Telegram Channel : https://t.me/ShrutiBots 120 | # =========================================== 121 | 122 | 123 | # ❤️ Love From ShrutiBots 124 | -------------------------------------------------------------------------------- /ShrutiMusic/platforms/Spotify.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import re 24 | 25 | import spotipy 26 | from spotipy.oauth2 import SpotifyClientCredentials 27 | from py_yt import VideosSearch 28 | import config 29 | 30 | 31 | class SpotifyAPI: 32 | def __init__(self): 33 | self.regex = r"^(https:\/\/open.spotify.com\/)(.*)$" 34 | self.client_id = config.SPOTIFY_CLIENT_ID 35 | self.client_secret = config.SPOTIFY_CLIENT_SECRET 36 | if config.SPOTIFY_CLIENT_ID and config.SPOTIFY_CLIENT_SECRET: 37 | self.client_credentials_manager = SpotifyClientCredentials( 38 | self.client_id, self.client_secret 39 | ) 40 | self.spotify = spotipy.Spotify( 41 | client_credentials_manager=self.client_credentials_manager 42 | ) 43 | else: 44 | self.spotify = None 45 | 46 | async def valid(self, link: str): 47 | if re.search(self.regex, link): 48 | return True 49 | else: 50 | return False 51 | 52 | async def track(self, link: str): 53 | track = self.spotify.track(link) 54 | info = track["name"] 55 | for artist in track["artists"]: 56 | fetched = f' {artist["name"]}' 57 | if "Various Artists" not in fetched: 58 | info += fetched 59 | results = VideosSearch(info, limit=1) 60 | for result in (await results.next())["result"]: 61 | ytlink = result["link"] 62 | title = result["title"] 63 | vidid = result["id"] 64 | duration_min = result["duration"] 65 | thumbnail = result["thumbnails"][0]["url"].split("?")[0] 66 | track_details = { 67 | "title": title, 68 | "link": ytlink, 69 | "vidid": vidid, 70 | "duration_min": duration_min, 71 | "thumb": thumbnail, 72 | } 73 | return track_details, vidid 74 | 75 | async def playlist(self, url): 76 | playlist = self.spotify.playlist(url) 77 | playlist_id = playlist["id"] 78 | results = [] 79 | for item in playlist["tracks"]["items"]: 80 | music_track = item["track"] 81 | info = music_track["name"] 82 | for artist in music_track["artists"]: 83 | fetched = f' {artist["name"]}' 84 | if "Various Artists" not in fetched: 85 | info += fetched 86 | results.append(info) 87 | return results, playlist_id 88 | 89 | async def album(self, url): 90 | album = self.spotify.album(url) 91 | album_id = album["id"] 92 | results = [] 93 | for item in album["tracks"]["items"]: 94 | info = item["name"] 95 | for artist in item["artists"]: 96 | fetched = f' {artist["name"]}' 97 | if "Various Artists" not in fetched: 98 | info += fetched 99 | results.append(info) 100 | 101 | return ( 102 | results, 103 | album_id, 104 | ) 105 | 106 | async def artist(self, url): 107 | artistinfo = self.spotify.artist(url) 108 | artist_id = artistinfo["id"] 109 | results = [] 110 | artisttoptracks = self.spotify.artist_top_tracks(url) 111 | for item in artisttoptracks["tracks"]: 112 | info = item["name"] 113 | for artist in item["artists"]: 114 | fetched = f' {artist["name"]}' 115 | if "Various Artists" not in fetched: 116 | info += fetched 117 | results.append(info) 118 | 119 | return results, artist_id 120 | 121 | 122 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 123 | 124 | # =========================================== 125 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 126 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 127 | # 📢 Telegram Channel : https://t.me/ShrutiBots 128 | # =========================================== 129 | 130 | 131 | # ❤️ Love From ShrutiBots 132 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/misc/autoleave.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import asyncio 24 | from datetime import datetime 25 | from pyrogram.enums import ChatType 26 | from pytgcalls.exceptions import GroupCallNotFound 27 | import config 28 | from ShrutiMusic import app 29 | from ShrutiMusic.misc import db 30 | from ShrutiMusic.core.call import Nand, autoend, counter 31 | from ShrutiMusic.utils.database import get_client, set_loop, is_active_chat, is_autoend, is_autoleave 32 | import logging 33 | 34 | async def auto_leave(): 35 | while not await asyncio.sleep(900): 36 | from ShrutiMusic.core.userbot import assistants 37 | ender = await is_autoleave() 38 | if not ender: 39 | continue 40 | for num in assistants: 41 | client = await get_client(num) 42 | left = 0 43 | try: 44 | async for i in client.get_dialogs(): 45 | if i.chat.type in [ 46 | ChatType.SUPERGROUP, 47 | ChatType.GROUP, 48 | ChatType.CHANNEL, 49 | ]: 50 | if ( 51 | i.chat.id != config.LOG_GROUP_ID 52 | and i.chat.id != -1002016928980 and i.chat.id != -1002200386150 and i.chat.id != -1001397779415 53 | ): 54 | if left == 20: 55 | continue 56 | if not await is_active_chat(i.chat.id): 57 | try: 58 | await client.leave_chat(i.chat.id) 59 | left += 1 60 | except Exception as e: 61 | logging.error(f"Error leaving chat {i.chat.id}: {e}") 62 | continue 63 | except Exception as e: 64 | logging.error(f"Error processing dialogs: {e}") 65 | 66 | asyncio.create_task(auto_leave()) 67 | 68 | async def auto_end(): 69 | global autoend, counter 70 | while True: 71 | await asyncio.sleep(60) 72 | try: 73 | ender = await is_autoend() 74 | if not ender: 75 | continue 76 | chatss = autoend 77 | keys_to_remove = [] 78 | nocall = False 79 | for chat_id in chatss: 80 | try: 81 | users = len(await Nand.call_listeners(chat_id)) 82 | except GroupCallNotFound: 83 | users = 1 84 | nocall = True 85 | except Exception: 86 | users = 100 87 | timer = autoend.get(chat_id) 88 | if users == 1: 89 | res = await set_loop(chat_id, 0) 90 | keys_to_remove.append(chat_id) 91 | try: 92 | await db[chat_id][0]["mystic"].delete() 93 | except Exception: 94 | pass 95 | try: 96 | await Nand.stop_stream(chat_id) 97 | except Exception: 98 | pass 99 | try: 100 | if not nocall: 101 | await app.send_message(chat_id, "» ʙᴏᴛ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ʟᴇғᴛ ᴠɪᴅᴇᴏᴄʜᴀᴛ ʙᴇᴄᴀᴜsᴇ ɴᴏ ᴏɴᴇ ᴡᴀs ʟɪsᴛᴇɴɪɴɢ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.") 102 | except Exception: 103 | pass 104 | for chat_id in keys_to_remove: 105 | del autoend[chat_id] 106 | except Exception as e: 107 | logging.info(e) 108 | 109 | asyncio.create_task(auto_end()) 110 | 111 | 112 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 113 | 114 | # =========================================== 115 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 116 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 117 | # 📢 Telegram Channel : https://t.me/ShrutiBots 118 | # =========================================== 119 | 120 | 121 | # ❤️ Love From ShrutiBots 122 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/database/assistantdatabase.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import random 24 | 25 | from ShrutiMusic import userbot 26 | from ShrutiMusic.core.mongo import mongodb 27 | 28 | db = mongodb.assistants 29 | 30 | assistantdict = {} 31 | 32 | 33 | async def get_client(assistant: int): 34 | if int(assistant) == 1: 35 | return userbot.one 36 | elif int(assistant) == 2: 37 | return userbot.two 38 | elif int(assistant) == 3: 39 | return userbot.three 40 | elif int(assistant) == 4: 41 | return userbot.four 42 | elif int(assistant) == 5: 43 | return userbot.five 44 | 45 | 46 | async def save_assistant(chat_id, number): 47 | number = int(number) 48 | await db.update_one( 49 | {"chat_id": chat_id}, 50 | {"$set": {"assistant": number}}, 51 | upsert=True, 52 | ) 53 | 54 | 55 | async def set_assistant(chat_id): 56 | from ShrutiMusic.core.userbot import assistants 57 | 58 | ran_assistant = random.choice(assistants) 59 | assistantdict[chat_id] = ran_assistant 60 | await db.update_one( 61 | {"chat_id": chat_id}, 62 | {"$set": {"assistant": ran_assistant}}, 63 | upsert=True, 64 | ) 65 | userbot = await get_client(ran_assistant) 66 | return userbot 67 | 68 | 69 | async def get_assistant(chat_id: int) -> str: 70 | from ShrutiMusic.core.userbot import assistants 71 | 72 | assistant = assistantdict.get(chat_id) 73 | if not assistant: 74 | dbassistant = await db.find_one({"chat_id": chat_id}) 75 | if not dbassistant: 76 | userbot = await set_assistant(chat_id) 77 | return userbot 78 | else: 79 | got_assis = dbassistant["assistant"] 80 | if got_assis in assistants: 81 | assistantdict[chat_id] = got_assis 82 | userbot = await get_client(got_assis) 83 | return userbot 84 | else: 85 | userbot = await set_assistant(chat_id) 86 | return userbot 87 | else: 88 | if assistant in assistants: 89 | userbot = await get_client(assistant) 90 | return userbot 91 | else: 92 | userbot = await set_assistant(chat_id) 93 | return userbot 94 | 95 | 96 | async def set_calls_assistant(chat_id): 97 | from ShrutiMusic.core.userbot import assistants 98 | 99 | ran_assistant = random.choice(assistants) 100 | assistantdict[chat_id] = ran_assistant 101 | await db.update_one( 102 | {"chat_id": chat_id}, 103 | {"$set": {"assistant": ran_assistant}}, 104 | upsert=True, 105 | ) 106 | return ran_assistant 107 | 108 | 109 | async def group_assistant(self, chat_id: int) -> int: 110 | from ShrutiMusic.core.userbot import assistants 111 | 112 | assistant = assistantdict.get(chat_id) 113 | if not assistant: 114 | dbassistant = await db.find_one({"chat_id": chat_id}) 115 | if not dbassistant: 116 | assis = await set_calls_assistant(chat_id) 117 | else: 118 | assis = dbassistant["assistant"] 119 | if assis in assistants: 120 | assistantdict[chat_id] = assis 121 | assis = assis 122 | else: 123 | assis = await set_calls_assistant(chat_id) 124 | else: 125 | if assistant in assistants: 126 | assis = assistant 127 | else: 128 | assis = await set_calls_assistant(chat_id) 129 | if int(assis) == 1: 130 | return self.one 131 | elif int(assis) == 2: 132 | return self.two 133 | elif int(assis) == 3: 134 | return self.three 135 | elif int(assis) == 4: 136 | return self.four 137 | elif int(assis) == 5: 138 | return self.five 139 | 140 | 141 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 142 | 143 | # =========================================== 144 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 145 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 146 | # 📢 Telegram Channel : https://t.me/ShrutiBots 147 | # =========================================== 148 | 149 | 150 | # ❤️ Love From ShrutiBots 151 | -------------------------------------------------------------------------------- /ShrutiMusic/plugins/tools/invitelink.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | import os 24 | from pyrogram import Client, filters 25 | from pyrogram.errors import FloodWait 26 | from pyrogram.types import Message 27 | from ShrutiMusic import app 28 | from ShrutiMusic.misc import SUDOERS 29 | from pyrogram.enums import ChatMemberStatus 30 | import asyncio 31 | 32 | 33 | 34 | 35 | @app.on_message(filters.command("leave") & SUDOERS) 36 | async def leave(_, message): 37 | if len(message.command) != 2: 38 | return await message.reply_text("ᴘʟᴇᴀsᴇ ᴘʀᴏᴠɪᴅᴇ ᴀ ɢʀᴏᴜᴘ ɪᴅ. ᴜsᴇ ʟɪᴋᴇ: /leave chat_id.") 39 | try: 40 | chat_id = int(message.command[1]) 41 | except ValueError: 42 | return await message.reply_text(f"ɪɴᴠᴀʟɪᴅ ᴄʜᴀᴛ ɪᴅ. ᴘʟᴇᴀsᴇ ᴇɴᴛᴇʀ ᴀ ɴᴜᴍᴇʀɪᴄ ɪᴅ.") 43 | CHAMPU = await message.reply_text(f"ʟᴇᴀᴠɪɴɢ ᴄʜᴀᴛ... {app.me.mention}") 44 | try: 45 | await app.send_message(chat_id, f"{app.me.mention} ʟᴇғᴛɪɴɢ ᴄʜᴀᴛ ʙʏᴇ...") 46 | await app.leave_chat(chat_id) 47 | await CHAMPU.edit(f"{app.me.mention} ʟᴇғᴛ ᴄʜᴀᴛ {chat_id}.") 48 | except Exception as e: 49 | pass 50 | 51 | 52 | # Command handler for /givelink command 53 | @app.on_message(filters.command("givelink")) 54 | async def give_link_command(client, message): 55 | # Generate an invite link for the chat where the command is used 56 | chat = message.chat.id 57 | link = await app.export_chat_invite_link(chat) 58 | await message.reply_text(f"ʜᴇʀᴇ's ᴛʜᴇ ɪɴᴠɪᴛᴇ ʟɪɴᴋ ғᴏʀ ᴛʜɪs ᴄʜᴀᴛ:\n{link}") 59 | 60 | 61 | @app.on_message( 62 | filters.command( 63 | ["link", "invitelink"], prefixes=["/", "!", "%", ",", "", ".", "@", "#"] 64 | ) 65 | & SUDOERS 66 | ) 67 | async def link_command_handler(client: Client, message: Message): 68 | if len(message.command) != 2: 69 | await message.reply("ɪɴᴠᴀʟɪᴅ ᴜsᴀɢᴇ. ᴄᴏʀʀᴇᴄᴛ ғᴏʀᴍᴀᴛ: /link group_id") 70 | return 71 | 72 | group_id = message.command[1] 73 | file_name = f"group_info_{group_id}.txt" 74 | 75 | try: 76 | chat = await client.get_chat(int(group_id)) 77 | 78 | if chat is None: 79 | await message.reply("ᴜɴᴀʙʟᴇ ᴛᴏ ɢᴇᴛ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ғᴏʀ ᴛʜᴇ sᴘᴇᴄɪғɪᴇᴅ ɢʀᴏᴜᴘ ɪᴅ.") 80 | return 81 | 82 | try: 83 | invite_link = await client.export_chat_invite_link(chat.id) 84 | except FloodWait as e: 85 | await message.reply(f"ғʟᴏᴏᴅᴡᴀɪᴛ: {e.x} sᴇᴄᴏɴᴅs. ʀᴇᴛʀʏɪɴɢ ɪɴ {e.x} sᴇᴄᴏɴᴅs.") 86 | return 87 | 88 | group_data = { 89 | "ɪᴅ": chat.id, 90 | "ᴛʏᴘᴇ": str(chat.type), 91 | "ᴛɪᴛʟᴇ": chat.title, 92 | "ᴍᴇᴍʙᴇʀs_ᴄᴏᴜɴᴛ": chat.members_count, 93 | "ᴅᴇsᴄʀɪᴘᴛɪᴏɴ": chat.description, 94 | "ɪɴᴠɪᴛᴇ_ʟɪɴᴋ": invite_link, 95 | "ɪs_ᴠᴇʀɪғɪᴇᴅ": chat.is_verified, 96 | "ɪs_ʀᴇsᴛʀɪᴄᴛᴇᴅ": chat.is_restricted, 97 | "ɪs_ᴄʀᴇᴀᴛᴏʀ": chat.is_creator, 98 | "ɪs_sᴄᴀᴍ": chat.is_scam, 99 | "ɪs_ғᴀᴋᴇ": chat.is_fake, 100 | "ᴅᴄ_ɪᴅ": chat.dc_id, 101 | "ʜᴀs_ᴘʀᴏᴛᴇᴄᴛᴇᴅ_ᴄᴏɴᴛᴇɴᴛ": chat.has_protected_content, 102 | } 103 | 104 | with open(file_name, "w", encoding="utf-8") as file: 105 | for key, value in group_data.items(): 106 | file.write(f"{key}: {value}\n") 107 | 108 | await client.send_document( 109 | chat_id=message.chat.id, 110 | document=file_name, 111 | caption=f"ʜᴇʀᴇ ɪs ᴛʜᴇ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ғᴏʀ\n{chat.title}\nᴛʜᴇ ɢʀᴏᴜᴘ ɪɴғᴏʀᴍᴀᴛɪᴏɴ sᴄʀᴀᴘᴇᴅ ʙʏ : @{app.username}", 112 | ) 113 | 114 | except Exception as e: 115 | await message.reply(f"Error: {str(e)}") 116 | 117 | finally: 118 | if os.path.exists(file_name): 119 | os.remove(file_name) 120 | 121 | 122 | __MODULE__ = "Gʀᴏᴜᴘ Lɪɴᴋ" 123 | __HELP__ = """ 124 | - `/givelink`: Gᴇᴛ ᴛʜᴇ ɪɴᴠɪᴛᴇ ɪɴᴋ ғᴏʀ ᴛʜᴇ ᴄᴜʀʀᴇɴᴛ ᴄʜᴀᴛ. 125 | - `/link ɢʀᴏᴜᴘ_ɪᴅ`: Gᴇᴛ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ᴀɴᴅ ɢᴇɴᴇʀᴀᴛᴇ ᴀɴ ɪɴᴠɪᴛᴇ ɪɴᴋ ғᴏʀ ᴛʜᴇ sᴘᴇᴄɪғɪᴇᴅ ɢʀᴏᴜᴘ ID. 126 | """ 127 | 128 | 129 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 130 | 131 | # =========================================== 132 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 133 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 134 | # 📢 Telegram Channel : https://t.me/ShrutiBots 135 | # =========================================== 136 | 137 | 138 | # ❤️ Love From ShrutiBots 139 | -------------------------------------------------------------------------------- /ShrutiMusic/utils/inline/settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Nand Yaduwanshi 2 | # Location: Supaul, Bihar 3 | # 4 | # All rights reserved. 5 | # 6 | # This code is the intellectual property of Nand Yaduwanshi. 7 | # You are not allowed to copy, modify, redistribute, or use this 8 | # code for commercial or personal projects without explicit permission. 9 | # 10 | # Allowed: 11 | # - Forking for personal learning 12 | # - Submitting improvements via pull requests 13 | # 14 | # Not Allowed: 15 | # - Claiming this code as your own 16 | # - Re-uploading without credit or permission 17 | # - Selling or using commercially 18 | # 19 | # Contact for permissions: 20 | # Email: badboy809075@gmail.com 21 | 22 | 23 | from typing import Union 24 | 25 | from pyrogram.types import InlineKeyboardButton 26 | 27 | 28 | def setting_markup(_): 29 | buttons = [ 30 | [ 31 | InlineKeyboardButton(text=_["ST_B_1"], callback_data="AU"), 32 | InlineKeyboardButton(text=_["ST_B_3"], callback_data="LG"), 33 | ], 34 | [ 35 | InlineKeyboardButton(text=_["ST_B_2"], callback_data="PM"), 36 | ], 37 | [ 38 | InlineKeyboardButton(text=_["ST_B_4"], callback_data="VM"), 39 | ], 40 | [ 41 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data="close"), 42 | ], 43 | ] 44 | return buttons 45 | 46 | 47 | def vote_mode_markup(_, current, mode: Union[bool, str] = None): 48 | buttons = [ 49 | [ 50 | InlineKeyboardButton(text="Vᴏᴛɪɴɢ ᴍᴏᴅᴇ ➜", callback_data="VOTEANSWER"), 51 | InlineKeyboardButton( 52 | text=_["ST_B_5"] if mode == True else _["ST_B_6"], 53 | callback_data="VOMODECHANGE", 54 | ), 55 | ], 56 | [ 57 | InlineKeyboardButton(text="-2", callback_data="FERRARIUDTI M"), 58 | InlineKeyboardButton( 59 | text=f"ᴄᴜʀʀᴇɴᴛ : {current}", 60 | callback_data="ANSWERVOMODE", 61 | ), 62 | InlineKeyboardButton(text="+2", callback_data="FERRARIUDTI A"), 63 | ], 64 | [ 65 | InlineKeyboardButton( 66 | text=_["BACK_BUTTON"], 67 | callback_data="settings_helper", 68 | ), 69 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data="close"), 70 | ], 71 | ] 72 | return buttons 73 | 74 | 75 | def auth_users_markup(_, status: Union[bool, str] = None): 76 | buttons = [ 77 | [ 78 | InlineKeyboardButton(text=_["ST_B_7"], callback_data="AUTHANSWER"), 79 | InlineKeyboardButton( 80 | text=_["ST_B_8"] if status == True else _["ST_B_9"], 81 | callback_data="AUTH", 82 | ), 83 | ], 84 | [ 85 | InlineKeyboardButton(text=_["ST_B_1"], callback_data="AUTHLIST"), 86 | ], 87 | [ 88 | InlineKeyboardButton( 89 | text=_["BACK_BUTTON"], 90 | callback_data="settings_helper", 91 | ), 92 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data="close"), 93 | ], 94 | ] 95 | return buttons 96 | 97 | 98 | def playmode_users_markup( 99 | _, 100 | Direct: Union[bool, str] = None, 101 | Group: Union[bool, str] = None, 102 | Playtype: Union[bool, str] = None, 103 | ): 104 | buttons = [ 105 | [ 106 | InlineKeyboardButton(text=_["ST_B_10"], callback_data="SEARCHANSWER"), 107 | InlineKeyboardButton( 108 | text=_["ST_B_11"] if Direct == True else _["ST_B_12"], 109 | callback_data="MODECHANGE", 110 | ), 111 | ], 112 | [ 113 | InlineKeyboardButton(text=_["ST_B_13"], callback_data="AUTHANSWER"), 114 | InlineKeyboardButton( 115 | text=_["ST_B_8"] if Group == True else _["ST_B_9"], 116 | callback_data="CHANNELMODECHANGE", 117 | ), 118 | ], 119 | [ 120 | InlineKeyboardButton(text=_["ST_B_14"], callback_data="PLAYTYPEANSWER"), 121 | InlineKeyboardButton( 122 | text=_["ST_B_8"] if Playtype == True else _["ST_B_9"], 123 | callback_data="PLAYTYPECHANGE", 124 | ), 125 | ], 126 | [ 127 | InlineKeyboardButton( 128 | text=_["BACK_BUTTON"], 129 | callback_data="settings_helper", 130 | ), 131 | InlineKeyboardButton(text=_["CLOSE_BUTTON"], callback_data="close"), 132 | ], 133 | ] 134 | return buttons 135 | 136 | 137 | # ©️ Copyright Reserved - @NoxxOP Nand Yaduwanshi 138 | 139 | # =========================================== 140 | # ©️ 2025 Nand Yaduwanshi (aka @NoxxOP) 141 | # 🔗 GitHub : https://github.com/NoxxOP/ShrutiMusic 142 | # 📢 Telegram Channel : https://t.me/ShrutiBots 143 | # =========================================== 144 | 145 | 146 | # ❤️ Love From ShrutiBots 147 | --------------------------------------------------------------------------------