File size: 733 Bytes
a8e9b84 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from pyrogram import filters
from pyrogram.types import Message
from DragMusic import app
from DragMusic.core.call import Drag
from DragMusic.utils.database import set_loop
from DragMusic.utils.decorators import AdminRightsCheck
from DragMusic.utils.inline import close_markup
from config import BANNED_USERS
@app.on_message(
filters.command(["end", "stop", "cend", "cstop"]) & filters.group & ~BANNED_USERS
)
@AdminRightsCheck
async def stop_music(cli, message: Message, _, chat_id):
if not len(message.command) == 1:
return
await Drag.stop_stream(chat_id)
await set_loop(chat_id, 0)
await message.reply_text(
_["admin_5"].format(message.from_user.mention), reply_markup=close_markup(_)
)
|