Skip to content
This repository was archived by the owner on Nov 10, 2021. It is now read-only.

Commit e10f47d

Browse files
author
Kennedy
authored
Add files via upload
1 parent 2106d5a commit e10f47d

File tree

11 files changed

+289
-1
lines changed

11 files changed

+289
-1
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM python:3.9.6-slim-buster
2+
RUN apt update && apt upgrade -y
3+
RUN apt install git curl python3-pip ffmpeg -y
4+
RUN pip3 install -U pip
5+
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
6+
RUN apt-get install -y nodejs
7+
RUN npm i -g npm
8+
RUN mkdir /app/
9+
COPY . /app/
10+
WORKDIR /app/
11+
RUN pip3 install -U -r requirements.txt
12+
CMD python3 main.py

README.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
1-
# KennedyXMusic
1+
<h2 align="centre">🎶 Veez Music Bot</h2>
2+
3+
### Music bot for playing music on telegram voice chat group.
4+
<p align="center"><a href="https://t.me/VeezMusicBot"><img src="https://telegra.ph/file/8bf3d62837cb59c3f8e7f.png" width="300"></a></p>
5+
<p align="center">
6+
<a href="https://www.python.org/" alt="made-with-python"> <img src="https://img.shields.io/badge/Made%20with-Python-black.svg?style=flat-square&logo=python&logoColor=blue&color=red" /></a>
7+
<a href="https://github.com/levina-lab/VeezMusic/graphs/commit-activity" alt="Maintenance"> <img src="https://img.shields.io/badge/Maintained%3F-yes-red.svg?style=flat-square" /></a>
8+
<a href="https://app.codacy.com/gh/levina-lab/VeezMusic/dashboard"> <img src="https://img.shields.io/codacy/grade/a723cb464d5a4d25be3152b5d71de82d?color=red&logo=codacy&style=flat-square" alt="Codacy" /></a><br>
9+
<a href="https://github.com/levina-lab/VeezMusic"> <img src="https://img.shields.io/github/repo-size/levina-lab/VeezMusic?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
10+
<a href="https://github.com/levina-lab/VeezMusic/commits/main"> <img src="https://img.shields.io/github/last-commit/levina-lab/VeezMusic?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
11+
<a href="https://github.com/levina-lab/VeezMusic/issues"> <img src="https://img.shields.io/github/issues/levina-lab/VeezMusic?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
12+
<a href="https://github.com/levina-lab/VeezMusic/network/members"> <img src="https://img.shields.io/github/forks/levina-lab/VeezMusic?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
13+
<a href="https://github.com/levina-lab/VeezMusic/network/members"> <img src="https://img.shields.io/github/stars/levina-lab/VeezMusic?color=red&logo=github&logoColor=blue&style=flat-square" /></a>
14+
</p>
15+
16+
<h3>Requirements 📝</h3>
17+
18+
- FFmpeg
19+
- NodeJS [nodesource.com](https://nodesource.com/)
20+
- Python 3.8+ or 3.7
21+
- [PyTgCalls](https://github.com/pytgcalls/pytgcalls)
22+
23+
🧪 Get STRING_SESSION from here:
24+
25+
[![GenerateString](https://img.shields.io/badge/repl.it-generateString-yellowgreen)](https://replit.com/@levinalab/StringSession#main.py)
26+
27+
28+
## Commands 🛠
29+
30+
- `/play <song name>` - play song you requested
31+
- `/playlist` - Show now playing list
32+
- `/current` - Show now playing
33+
- `/song <song name>` - download songs you want quickly
34+
- `/search <query>` - search videos on youtube with details
35+
- `/vsong <song name>` - download videos you want quickly
36+
37+
#### Admins Only 👷‍♂️
38+
- `/player` - open music player settings panel
39+
- `/pause` - pause song play
40+
- `/resume` - resume song play
41+
- `/skip` - play next song
42+
- `/end` - stop music play
43+
- `/musicplayer on` - to disable music player in your group
44+
- `/musicplayer off` - to enable music player in your group
45+
- `/userbotjoin` - invite assistant to your chat
46+
- `/userbotleave` - remove assistant from your chat
47+
- `/reload` - Refresh admin list
48+
- `/uptime` - check the bot uptime status
49+
- `/ping` - check the bot ping status
50+
51+
### Sudo User 🧙‍♂️
52+
- `/pmpermit on | off` turn on/off the assistant pmpermit
53+
- `/userbotleaveall` - order the assistant to leave all groups
54+
- `/gcast` - send a broadcast message
55+
56+
### pm-permit 💬
57+
- `.yes` - approve user for sending message to assistant
58+
- `.no` - disapprove user for sending message to assistant
59+
60+
## 🔎 Support Inline Search
61+
62+
## Heroku Deployment 💜
63+
The easy way to host this bot, deploy to Heroku
64+
65+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/levina-lab/veezmusic)
66+
67+
## Railway Deployment 🚄
68+
For deployment on railway you can see the full of [Necessary Variables Here](https://github.com/levina-lab/VeezMusic/blob/main/example.env), make sure you fill all of it.
69+
70+
[![Deploy+on+Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https://github.com/levina-lab/VeezMusic&envs=SESSION_NAME,BOT_TOKEN,BOT_USERNAME,BOT_NAME,GROUP_SUPPORT,ASSISTANT_NAME,BG_IMAGE,UPDATES_CHANNEL,API_ID,PMPERMIT,API_HASH,SUDO_USERS,DURATION_LIMIT,THUMB_IMG)
71+
72+
### Special Credits 💖
73+
- [Levina](https://github.com/levina-lab): Dev
74+
- [Tofik](https://github.com/tofikdn): Dev
75+
- [Mr.Zxce3](https://github.com/Zxce3): Dev
76+
- [Laky](https://github.com/Laky-64) & [Andrew](https://github.com/AndrewLaneX): PyTgCalls
77+
- [Original Repo](https://github.com/suprojects/CallsMusic)
78+
- [Veez Music Bot](https://t.me/veezmusicbot) Our Music Bot
79+
- [RojSerBest](https://github.com/rojserbest) CallsMusic Developer
80+
81+
### Support & Updates 🎑
82+
<a href="https://t.me/VeezSupportGroup"><img src="https://img.shields.io/badge/Join-Group%20Support-blue.svg?style=for-the-badge&logo=Telegram"></a> <a href="https://t.me/levinachannel"><img src="https://img.shields.io/badge/Join-Updates%20Channel-blue.svg?style=for-the-badge&logo=Telegram"></a>

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-dinky

app.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"name": "Veez Music Bot",
3+
"logo": "https://i.postimg.cc/SQBqsJjN/logo8-11-232731.png",
4+
"description": "Veez Music project allow you to stream music trought the telegram voice chat feature.",
5+
"keywords": ["music", "voice chat", "telegram"],
6+
"repository": "https://github.com/levina-lab/veezmusic",
7+
"stack": "container",
8+
"env": {
9+
"SESSION_NAME": {
10+
"description": "fill with the pyrogram session string",
11+
"required": true
12+
},
13+
"BOT_TOKEN": {
14+
"description": "your bot token from @BotFather",
15+
"required": true
16+
},
17+
"BOT_NAME": {
18+
"description": "your music bot name.",
19+
"required": false,
20+
"value": ""
21+
},
22+
"BOT_USERNAME": {
23+
"description": "fill with your bot username without @",
24+
"required": true,
25+
"value": "veezmusicbot"
26+
},
27+
"ASSISTANT_NAME": {
28+
"description": "fill with the assistant username without @",
29+
"required": true,
30+
"value": "veezasisstant"
31+
},
32+
"BG_IMAGE": {
33+
"description": "fill with your link costum background image",
34+
"required": false,
35+
"value": "https://telegra.ph/file/d91623e9cefcef8fb3aa8.png"
36+
},
37+
"THUMB_IMG": {
38+
"description": "fill with costum thumbnail image it's different with bg_image",
39+
"required": false,
40+
"value": "https://telegra.ph/file/14500969a4b584d1cd672.png"
41+
},
42+
"OWNER_NAME": {
43+
"description": "fill with your username without @",
44+
"required": false,
45+
"value": "dlwrml"
46+
},
47+
"API_ID": {
48+
"description": "your App ID from my.telegram.org/apps",
49+
"required": true
50+
},
51+
"API_HASH": {
52+
"description": "your Api hash from my.telegram.org/apps",
53+
"required": true
54+
},
55+
"SUDO_USERS": {
56+
"description": "list id untuk daftar anggota sudo (pisahkan dengan spasi).",
57+
"required": true
58+
},
59+
"DURATION_LIMIT": {
60+
"description": "max durasi untuk video yang diunduh (dalam menit).",
61+
"required": true,
62+
"value": "15"
63+
},
64+
"PMPERMIT": {
65+
"description": "pm-permit for assistant.",
66+
"required": false,
67+
"value": "ENABLE"
68+
},
69+
"UPDATES_CHANNEL": {
70+
"description": "isi dengan username channel kamu, jika tidak punya lewati saja",
71+
"required": false,
72+
"value": "levinachannel"
73+
},
74+
"GROUP_SUPPORT": {
75+
"description": "isi dengan username grup kamu, jika tidak punya skip saja",
76+
"required": false,
77+
"value": "gcsupportbots"
78+
}
79+
},
80+
"buildpacks": [
81+
{
82+
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
83+
},
84+
{
85+
"url": "heroku/python"
86+
}
87+
]
88+
}

config.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import os
2+
from os import getenv
3+
from dotenv import load_dotenv
4+
5+
if os.path.exists("local.env"):
6+
load_dotenv("local.env")
7+
8+
load_dotenv()
9+
que = {}
10+
SESSION_NAME = getenv("SESSION_NAME", "session")
11+
BOT_TOKEN = getenv("BOT_TOKEN")
12+
BOT_NAME = getenv("BOT_NAME", "Veez Music")
13+
BG_IMAGE = getenv("BG_IMAGE", "https://telegra.ph/file/1a1d2f92fab433c94577f.png")
14+
THUMB_IMG = getenv("THUMB_IMG", "https://telegra.ph/file/6749fa1702d30612ad0a4.png")
15+
AUD_IMG = getenv("AUD_IMG", "https://telegra.ph/file/49342251174d89e1a671e.png")
16+
QUE_IMG = getenv("QUE_IMG", "https://telegra.ph/file/5c4e60fc17c45d56f39e8.png")
17+
admins = {}
18+
API_ID = int(getenv("API_ID"))
19+
API_HASH = getenv("API_HASH")
20+
BOT_USERNAME = getenv("BOT_USERNAME", "veezmusicbot")
21+
ASSISTANT_NAME = getenv("ASSISTANT_NAME", "veezassistant")
22+
GROUP_SUPPORT = getenv("GROUP_SUPPORT", "VeezSupportGroup")
23+
UPDATES_CHANNEL = getenv("UPDATES_CHANNEL", "levinachannel")
24+
OWNER_NAME = getenv("OWNER_NAME", "dlwrml") # isi dengan username kamu tanpa simbol @
25+
DEV_NAME = getenv("DEV_NAME", "dlwrml")
26+
PMPERMIT = getenv("PMPERMIT", None)
27+
28+
DURATION_LIMIT = int(getenv("DURATION_LIMIT", "60"))
29+
30+
COMMAND_PREFIXES = list(getenv("COMMAND_PREFIXES", "/ ! .").split())
31+
32+
SUDO_USERS = list(map(int, getenv("SUDO_USERS").split()))

example.env

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SESSION_NAME= Your Session # If you don't deploy with docker, keep it as is and if you do so it should be a session string generated by "python str.py"
2+
BOT_USERNAME=VeezMusicBot
3+
BOT_TOKEN= Bot Token
4+
BOT_NAME=Veez Music
5+
API_ID= #Your API ID
6+
API_HASH= #Your HASH
7+
BG_IMAGE=https://telegra.ph/file/1a1d2f92fab433c94577f.png
8+
THUMB_IMG=https://telegra.ph/file/14500969a4b584d1cd672.png
9+
SUDO_USERS=1757169682 1670523611 1727937540 # List of user IDs separated by space
10+
DURATION_LIMIT=40 # in minutes (default: 7)
11+
UPDATES_CHANNEL=levinachannel
12+
GROUP_SUPPORT=VeezSupportGroup
13+
ASSISTANT_NAME=veezassistant
14+
OWNER_NAME=dlwrml
15+
PMPERMIT=ENABLE

heroku.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build:
2+
docker:
3+
worker: Dockerfile
4+
run:
5+
worker: python3 main.py

main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import requests
2+
from pyrogram import Client as Bot
3+
4+
from callsmusic import run
5+
from config import API_ID, API_HASH, BOT_TOKEN, BG_IMAGE
6+
7+
response = requests.get(BG_IMAGE)
8+
with open("./etc/foreground.png", "wb") as file:
9+
file.write(response.content)
10+
bot = Bot(
11+
":memory:",
12+
API_ID,
13+
API_HASH,
14+
bot_token=BOT_TOKEN,
15+
plugins=dict(root="handlers")
16+
)
17+
18+
bot.start()
19+
run()

requirements.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pyrogram
2+
tgcrypto
3+
py-tgcalls==0.5.5
4+
python-dotenv
5+
youtube_dl
6+
youtube_search_python
7+
requests
8+
aiohttp
9+
aiofiles
10+
asyncio
11+
youtube_search
12+
search_engine_parser
13+
ffmpeg
14+
Pillow
15+
future
16+
psutil
17+
wget
18+
tswift

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.9.6

str.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import asyncio
2+
3+
from pyrogram import Client
4+
5+
6+
print("Enter your app information from my.telegram.org/apps below.")
7+
8+
9+
async def main():
10+
async with Client(":memory:", api_id=int(input("API ID:")), api_hash=input("API HASH:")) as app:
11+
print(await app.export_session_string())
12+
13+
14+
if __name__ == "__main__":
15+
loop = asyncio.get_event_loop()
16+
loop.run_until_complete(main())

0 commit comments

Comments
 (0)