Skip to content

V3 #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 186 commits into
base: main
Choose a base branch
from
Open

V3 #78

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
c93c8f8
Asuraa
itzAsuraa Nov 17, 2024
c011ce9
Update README.md
CodeSearchDev Nov 17, 2024
8d16f07
remove welcome and left database
CodeSearchDev Nov 17, 2024
836e19e
Remove welcome file
CodeSearchDev Nov 17, 2024
d47994e
Delete left.py
CodeSearchDev Nov 17, 2024
ac030b5
Deletle welcome font
CodeSearchDev Nov 17, 2024
4ac87b0
Remove left imge
CodeSearchDev Nov 17, 2024
0f85e7e
Delete welcome image
CodeSearchDev Nov 17, 2024
89e324c
Remove faltu iamg
CodeSearchDev Nov 17, 2024
67dd827
Update tools
CodeSearchDev Nov 17, 2024
30712ba
Delete TanuMusic/plugins/tools/ask.py
CodeSearchDev Nov 17, 2024
592a0fb
Update eco.py
CodeSearchDev Nov 17, 2024
e71048b
Remove eco
CodeSearchDev Nov 17, 2024
9ab35fa
change Kang command
CodeSearchDev Nov 17, 2024
b67b7e1
@itzAsuraa
CodeSearchDev Nov 17, 2024
38a4aa6
Update __main__.py
CodeSearchDev Nov 17, 2024
6637eab
Update mongo.py
CodeSearchDev Nov 17, 2024
a339cfa
Update pornplay.py#
CodeSearchDev Nov 17, 2024
c2167d5
Update sangmata.py#
CodeSearchDev Nov 17, 2024
bf41df4
Update sangmata.py#
CodeSearchDev Nov 17, 2024
ce2d807
Update pornplay.py#
CodeSearchDev Nov 17, 2024
c7b6180
Remove porn play
CodeSearchDev Nov 17, 2024
aee9b3d
Delete TanuMusic/plugins/tools/quiz.py
CodeSearchDev Nov 17, 2024
5349e39
Update ytsearch.py
CodeSearchDev Nov 17, 2024
4877d1c
Update speedtest.py adding user command ping
CodeSearchDev Nov 17, 2024
0b370f4
Update en.yml
CodeSearchDev Nov 17, 2024
cbec3fc
Update en.yml
CodeSearchDev Nov 17, 2024
169118b
Update requirements.txt
CodeSearchDev Nov 17, 2024
5f7d815
Update tools
CodeSearchDev Nov 17, 2024
fc99c44
nothing
CodeSearchDev Nov 17, 2024
b29df7d
Update requirements.txt
CodeSearchDev Nov 17, 2024
95937d6
Update draw.py
CodeSearchDev Nov 17, 2024
7186b2a
Update git.py
CodeSearchDev Nov 17, 2024
30c6104
type object 'Mango' has no attribute 'images' try yo fix this error
CodeSearchDev Nov 17, 2024
f264fc7
Update draw.py
CodeSearchDev Nov 17, 2024
643cd4c
Update en.yml
CodeSearchDev Nov 18, 2024
b009158
Update en.yml
CodeSearchDev Nov 18, 2024
5de5d85
nothing
CodeSearchDev Nov 18, 2024
4aad8d7
Update tools
CodeSearchDev Nov 18, 2024
084636c
Update speedtest.py
CodeSearchDev Nov 18, 2024
37c2fee
Update ping.py
CodeSearchDev Nov 18, 2024
a5f056d
Update ping.py
CodeSearchDev Nov 18, 2024
2375c2d
Update en.yml
CodeSearchDev Nov 18, 2024
dd6084c
nothing
CodeSearchDev Nov 18, 2024
de336ee
nothing
CodeSearchDev Nov 18, 2024
9449c5e
adding buttons txt
CodeSearchDev Nov 18, 2024
21d7099
adding buttons code
CodeSearchDev Nov 18, 2024
22063dc
nothing
CodeSearchDev Nov 18, 2024
44b3874
nothing
CodeSearchDev Nov 18, 2024
f6c2787
Update helpers.py
CodeSearchDev Nov 18, 2024
354a507
Update config.py
CodeSearchDev Nov 19, 2024
82692db
Update misc.py
CodeSearchDev Nov 19, 2024
f8cd2d1
Update misc.py
CodeSearchDev Nov 19, 2024
7376fc4
Update misc.py
CodeSearchDev Nov 19, 2024
1293ca4
fix sudo listsudo
CodeSearchDev Nov 19, 2024
6f5f7ea
Update sudoers.py
CodeSearchDev Nov 19, 2024
7875606
Update sudoers.py
CodeSearchDev Nov 19, 2024
cf5ad6d
Update ar.yml
CodeSearchDev Nov 20, 2024
cedb955
Update hi.yml
CodeSearchDev Nov 20, 2024
2979d2a
Update pa.yml
CodeSearchDev Nov 20, 2024
d470570
Update tools
CodeSearchDev Nov 20, 2024
ad4cdbf
Update ask.py
CodeSearchDev Nov 20, 2024
fda3561
Delete TanuMusic/plugins/tools/ask.py
CodeSearchDev Nov 20, 2024
585ece7
fixing
CodeSearchDev Nov 21, 2024
df1fd09
fixing
CodeSearchDev Nov 21, 2024
b172d46
nothing
CodeSearchDev Nov 21, 2024
867f5e7
nothing
CodeSearchDev Nov 21, 2024
5a7917b
Updating
CodeSearchDev Nov 22, 2024
3891339
Update draw.py
CodeSearchDev Nov 22, 2024
1a1a267
Update start.py
CodeSearchDev Nov 23, 2024
d85cb6a
Update dev.py
CodeSearchDev Nov 23, 2024
53990b6
Update requirements.txt
CodeSearchDev Nov 24, 2024
50ab14c
nothing
CodeSearchDev Nov 24, 2024
2b39798
Update language.py
CodeSearchDev Nov 24, 2024
646abbe
Delete TanuMusic/utils/decorators/#play.py
CodeSearchDev Nov 24, 2024
85249f7
Update misc.py
CodeSearchDev Nov 24, 2024
1f310d6
Update cookies.txt
CodeSearchDev Nov 24, 2024
5056036
Update start.py
CodeSearchDev Nov 24, 2024
0110035
Update sudoers.py
CodeSearchDev Nov 24, 2024
6ed6433
Update misc.py
CodeSearchDev Nov 24, 2024
3f47c4d
Update misc.py
CodeSearchDev Nov 24, 2024
7f1b96c
Update config.py
CodeSearchDev Nov 24, 2024
c6a31d6
Update cookies.txt
CodeSearchDev Nov 24, 2024
eb1e330
Update cookies.txt
CodeSearchDev Nov 24, 2024
88ec5cd
Update en.yml
CodeSearchDev Nov 25, 2024
3f80a9b
Update config.py
CodeSearchDev Nov 25, 2024
abb500e
Update config.py
CodeSearchDev Nov 25, 2024
d3b0cd5
Update bot
CodeSearchDev Nov 25, 2024
06a01cd
Rename repo.py# to repo.py
CodeSearchDev Nov 25, 2024
e813792
Update helpers.py
CodeSearchDev Nov 25, 2024
d59b2c1
Update privacy.py
CodeSearchDev Nov 25, 2024
e0e14a3
Update privacy.py
CodeSearchDev Nov 25, 2024
778c2b9
Update privacy.py
CodeSearchDev Nov 25, 2024
0bf2c1f
Update privacy.py
CodeSearchDev Nov 25, 2024
12e18da
Update play.py
CodeSearchDev Nov 25, 2024
183c887
Update requirements.txt
CodeSearchDev Nov 26, 2024
4db4418
Update config.py
CodeSearchDev Nov 26, 2024
b4a73f7
Update userbot.py
CodeSearchDev Nov 27, 2024
0e558d9
Update filemanager.py
CodeSearchDev Nov 28, 2024
b6361fe
Update filemanager.py
CodeSearchDev Nov 29, 2024
c14b26a
Update filemanager.py
CodeSearchDev Nov 29, 2024
fc90929
Update filemanager.py
CodeSearchDev Nov 29, 2024
affb613
Update cookies.txt
CodeSearchDev Nov 29, 2024
89629ab
TypeError: 'coroutine' object is not callable
CodeSearchDev Nov 29, 2024
0bfceee
Update filemanager.py
CodeSearchDev Nov 29, 2024
619180c
Update cookies.txt
CodeSearchDev Nov 29, 2024
41f903f
Update tools
CodeSearchDev Nov 30, 2024
1f8f55b
Update requirements.txt
CodeSearchDev Dec 14, 2024
44de3d7
Update app.json
CodeSearchDev Dec 14, 2024
c2e161e
Update cookies.txt
CodeSearchDev Dec 14, 2024
085abdb
Update cookies.txt
CodeSearchDev Dec 14, 2024
66b7b71
Update cookies.txt
CodeSearchDev Dec 14, 2024
c52ac0e
Update speedtest.py
CodeSearchDev Dec 14, 2024
08f23a3
Delete TanuMusic/plugins/tools/draw.py
CodeSearchDev Dec 14, 2024
80ec733
Delete TanuMusic/plugins/tools/search.py
CodeSearchDev Dec 14, 2024
ffc524e
Update en.yml
CodeSearchDev Dec 14, 2024
71b4b45
Update start.py
CodeSearchDev Dec 14, 2024
642f3be
Update start.py
CodeSearchDev Dec 14, 2024
17e14e2
Update settings.py
CodeSearchDev Dec 14, 2024
10603b6
Update settings.py
CodeSearchDev Dec 14, 2024
28a1c98
Update requirements.txt
CodeSearchDev Dec 14, 2024
e1545e5
Update settings.py
CodeSearchDev Dec 14, 2024
206d0cd
Update database.py
CodeSearchDev Dec 14, 2024
c5f3cf5
Update sudo
CodeSearchDev Dec 14, 2024
4e8a6d6
Update autoleave.py
CodeSearchDev Dec 14, 2024
87c1a3c
Update active.py
CodeSearchDev Dec 14, 2024
b69d198
Update active.py
CodeSearchDev Dec 14, 2024
b25c727
Update en.yml
CodeSearchDev Dec 14, 2024
39b17ee
Update Youtube.py
CodeSearchDev Dec 15, 2024
2fdb095
Update active.py
CodeSearchDev Dec 15, 2024
0e87930
Update helpers.py
CodeSearchDev Dec 15, 2024
b95d4c0
Update tools
CodeSearchDev Dec 15, 2024
b872abe
Update requirements.txt
CodeSearchDev Dec 15, 2024
f4e6e0d
Update image.py
CodeSearchDev Dec 15, 2024
ab5ce5d
Update filemanager.py
CodeSearchDev Dec 15, 2024
08a580b
Update image.py
CodeSearchDev Dec 15, 2024
19a83eb
Update requirements.txt
CodeSearchDev Dec 15, 2024
77e7edd
Update image.py
CodeSearchDev Dec 15, 2024
91dc203
Update image.py
CodeSearchDev Dec 15, 2024
fd39141
Update active.py
CodeSearchDev Dec 15, 2024
3ae0a1a
Update requirements.txt
CodeSearchDev Dec 17, 2024
f76bdec
Update requirements.txt
CodeSearchDev Dec 17, 2024
b9a7c87
Update requirements.txt
CodeSearchDev Dec 17, 2024
3955d00
Update privacy.py
CodeSearchDev Dec 17, 2024
6436827
Update privacy.py
CodeSearchDev Dec 17, 2024
841cb9c
Update privacy.py
CodeSearchDev Dec 17, 2024
a559793
Update privacy.py
CodeSearchDev Dec 17, 2024
50d1782
Update privacy.py
CodeSearchDev Dec 17, 2024
a4ac9f9
Update tools
CodeSearchDev Dec 18, 2024
4e037c9
Update requirements.txt
CodeSearchDev Dec 18, 2024
27cc0e2
Update database.py
CodeSearchDev Dec 18, 2024
bdb2e3d
Update database.py
CodeSearchDev Dec 18, 2024
2ac0074
Update tools
CodeSearchDev Dec 18, 2024
a279f45
Update database.py
CodeSearchDev Dec 18, 2024
2961c6d
Update database.py
CodeSearchDev Dec 18, 2024
808d81f
Update mongo.py
CodeSearchDev Dec 18, 2024
520f8cc
Update database.py
CodeSearchDev Dec 18, 2024
59215f5
Update requirements.txt
CodeSearchDev Dec 18, 2024
5788409
Update requirements.txt
CodeSearchDev Dec 18, 2024
0cf48e8
Rename mongo.py to mongo.py#
CodeSearchDev Dec 18, 2024
bfe0b33
Update database.py
CodeSearchDev Dec 18, 2024
092f6ff
Update requirements.txt
CodeSearchDev Dec 18, 2024
381cc78
Update database.py
CodeSearchDev Dec 18, 2024
58c12e7
Update mongo.py#
CodeSearchDev Dec 18, 2024
e82dd92
Update cookies.txt
CodeSearchDev Dec 19, 2024
6f48ad3
Update en.yml
CodeSearchDev Dec 19, 2024
b126100
Update en.yml
CodeSearchDev Dec 19, 2024
8770c3b
Update en.yml
CodeSearchDev Dec 19, 2024
a87ba0d
Update en.yml
CodeSearchDev Dec 19, 2024
5eed239
Update cookies.txt
CodeSearchDev Dec 19, 2024
aa6bf42
Update helpers.py
CodeSearchDev Dec 19, 2024
ae7c6fb
Update helpers.py
CodeSearchDev Dec 19, 2024
87e5e89
Update cookies.txt
CodeSearchDev Dec 19, 2024
71098da
Update helpers.py
CodeSearchDev Dec 19, 2024
1f2af3c
Update helpers.py
CodeSearchDev Dec 19, 2024
9400ef7
Update helpers.py
CodeSearchDev Dec 19, 2024
d8d186d
Update start.py
CodeSearchDev Dec 20, 2024
835d4ab
Update requirements.txt
CodeSearchDev Dec 20, 2024
92de803
Update en.yml
CodeSearchDev Dec 20, 2024
adf53cd
Update thumbnails.py
CodeSearchDev Dec 20, 2024
4329456
Update mustjoin.py
CodeSearchDev Dec 21, 2024
1385a0c
Update en.yml
CodeSearchDev Dec 21, 2024
059d721
v2
Mister-Man7 Dec 22, 2024
8a2af91
add files
Mister-Man7 Jan 2, 2025
f4f06db
Merge branch 'github:main' into v3
Mister-Man7 Jan 2, 2025
1c06dea
Merge pull request #1 from Mister-Man7:latest
Mister-Man7 Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.env
.cache
log.txt
.DS_Store
*.session
raw_files/
cache/
downloads/
__pycache__/
*.session-journal
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
92 changes: 92 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '26 19 * * 1'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
39 changes: 39 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.env
.cache
log.txt
.DS_Store
*.session
raw_files/
cache/
downloads/
__pycache__/
*.session-journal
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM nikolaik/python-nodejs:python3.10-nodejs19

RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY . /app/
WORKDIR /app/
RUN pip3 install --no-cache-dir -U -r requirements.txt

CMD bash start
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
worker: bash start
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
</h2>
<p align="center">
<img src="https://envs.sh/pu3.jpg">
</p>

<h2 align="center">
˹ ᴛᴀɴᴜ ꭙ ᴍᴜsɪᴄ™ ♡゙
</h2>

[Tanu Music Bot](https://t.me/TanuMusicxBot) is a Powerful Telegram Music+Video Bot written in Python using Pyrogram and Py-Tgcalls by which you can stream songs, video and even live streams in your group calls via various sources.

* Youtube, Soundcloud, Apple Music, Spotify, Resso, Live Streams and Telegram Audios & Videos support.
* Written from scratch, making it stable and less crashes with attractive thumbnails.
* Loop, Seek, Shuffle, Specific Skip, Playlists etc support



## 🚀 Heroku Deployment

<h4>Click the button below to deploy Tanu Music Bot on Heroku!</h4>
<h4>If You show any error like failed to app Creation Then fork and deploy </h4>
<a href="https://dashboard.heroku.com/new?template=https://github.com/CodeSearchDev/TanuMusic"><img src="https://img.shields.io/badge/Deploy%20On%20Heroku-008080?style=for-the-badge&logo=heroku" width="200""/></a>


## 🖇 VPS Deployment
- Get your [Necessary Variables](https://github.com/itzAsuraa/TanuMusic/blob/master/sample.env)
- clone repo : `git clone https://github.com/itzAsuraa/TanuMusic && cd TanuMusic`
- Setup by : ` sudo bash setup`
- Install tmux to keep running your bot when you close the terminal by :
`sudo apt install tmux && tmux`
- Finally run the bot by :
`bash start`
- For getting out from tmux session : Press `Ctrl+b` and then `d`<br>


# Tanu Music Configs
[Checkout Here For Config Vars](https://github.com/itzAsuraa/TanuMusic/blob/master/config/ConfigReadme.md)
# 🏷 Support / Assistance

Reach out to the maintainer at one of the following places:

- [GitHub Issues](https://github.com/itzAsuraa/TanuMusic/issues/new?assignees=&labels=question&template=SUPPORT_QUESTION.md&title=support%3A+)
- Contact [Telegram profile](https://t.me/itzAsuraa)
- [Telegram Support](https://t.me/AsuraaSupports)

If you want to say **thank you** or/and support active development of TanuMusicBot:

- Add a [GitHub Star](https://github.com/itzAsuraa/TanuMusic) to the project.


Together, we can make **TanuMusic** better!

### Contact:
<a href="https://t.me/itzAsuraa">
<img title="Telegram" src="https://img.shields.io/badge/Telegram-%23000000.svg?&style=for-the-badge&logo=telegram&logoColor=61DAFB">
</a>
<a href="https://instagram.com/itzAsuraa">
<img title="Instagram" src="https://img.shields.io/badge/instagram-%23E4405F.svg?&style=for-the-badge&logo=instagram&logoColor=white">
</a>
26 changes: 26 additions & 0 deletions SprotifyMusic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from SprotifyMusic.core.bot import SprotifyBot
from SprotifyMusic.core.dir import dirr
from SprotifyMusic.core.git import git
from SprotifyMusic.core.userbot import Userbot
from SprotifyMusic.misc import dbb, heroku

from .logging import LOGGER

dirr()
git()
dbb()
heroku()

app = SprotifyBot()
userbot = Userbot()


from .platforms import *

Apple = AppleAPI()
Carbon = CarbonAPI()
SoundCloud = SoundAPI()
Spotify = SpotifyAPI()
Resso = RessoAPI()
Telegram = TeleAPI()
YouTube = YouTubeAPI()
62 changes: 62 additions & 0 deletions SprotifyMusic/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import asyncio
import importlib

from pyrogram import idle
from pytgcalls.exceptions import NoActiveGroupCall

import config
from SprotifyMusic import LOGGER, app, userbot
from SprotifyMusic.core.call import Sprotify
from SprotifyMusic.misc import sudo
from SprotifyMusic.plugins import ALL_MODULES
from SprotifyMusic.utils.database import get_banned_users, get_gbanned
from config import BANNED_USERS


async def init():
if (
not config.STRING1
and not config.STRING2
and not config.STRING3
and not config.STRING4
and not config.STRING5
):
LOGGER(__name__).error(">> Assistant client variables not defined, exiting...")
exit()
await sudo()
try:
users = await get_gbanned()
for user_id in users:
BANNED_USERS.add(user_id)
users = await get_banned_users()
for user_id in users:
BANNED_USERS.add(user_id)
except:
pass
await app.start()
for all_module in ALL_MODULES:
importlib.import_module("SprotifyMusic.plugins" + all_module)
LOGGER("SprotifyMusic.plugins").info(">> Successfully Imported Modules...💞")
await userbot.start()
await Sprotify.start()
try:
await Sprotify.stream_call("https://te.legra.ph/file/29f784eb49d230ab62e9e.mp4")
except NoActiveGroupCall:
LOGGER("SprotifyMusic").error(
">> Please turn on the videochat of your log group\channel.\n\n✦ Stopping Bot...💣"
)
exit()
except:
pass
await Sprotify.decorators()
LOGGER("SprotifyMusic").info(
">> Created By EasyWinter"
)
await idle()
await app.stop()
await userbot.stop()
LOGGER("SprotifyMusic").info(">> Stopping Sprotify Music Bot...💌")


if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(init())
Binary file added SprotifyMusic/assets/empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SprotifyMusic/assets/font.ttf
Binary file not shown.
Binary file added SprotifyMusic/assets/font2.ttf
Binary file not shown.
Binary file added SprotifyMusic/assets/font3.ttf
Binary file not shown.
Binary file added SprotifyMusic/assets/play_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions SprotifyMusic/core/bot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from pyrogram import Client, errors
from pyrogram.enums import ChatMemberStatus, ParseMode

import config

from ..logging import LOGGER


class SprotifyBot(Client):
def __init__(self):
LOGGER(__name__).info(f"❖ Starting Bot...♥︎")
super().__init__(
name="SprotifyMusic",
api_id=config.API_ID,
api_hash=config.API_HASH,
bot_token=config.BOT_TOKEN,
in_memory=True,
parse_mode=ParseMode.HTML,
max_concurrent_transmissions=7,
)

async def start(self):
await super().start()
self.id = self.me.id
self.name = self.me.first_name + " " + (self.me.last_name or "")
self.username = self.me.username
self.mention = self.me.mention

try:
await self.send_message(
chat_id=config.LOGGER_ID,
text=f"❖<b> {self.mention} ʙᴏᴛ sᴛᴀʀᴛᴇᴅ</b>\n\n● ɪᴅ ➥ <code>{self.id}</code>\n● ɴᴀᴍᴇ ➥ {self.name}\n● ᴜsᴇʀɴᴀᴍᴇ ➥ @{self.username}",
)
except (errors.ChannelInvalid, errors.PeerIdInvalid):
LOGGER(__name__).error(
"❖ Bot has failed to access the log group/channel. Make sure that you have added your bot to your log group/channel."
)
exit()
except Exception as ex:
LOGGER(__name__).error(
f"❖ Bot has failed to access the log group/channel.\n● Reason ➥ {type(ex).__name__}."
)
exit()

a = await self.get_chat_member(config.LOGGER_ID, self.id)
if a.status != ChatMemberStatus.ADMINISTRATOR:
LOGGER(__name__).error(
"❖ Please promote your bot as an admin in your log group/channel."
)
exit()
LOGGER(__name__).info(f"❖ Music Bot Started as ➥ {self.name} ...♥︎")

async def stop(self):
await super().stop()
Loading