Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
from pyrogram import Client
import asyncio
from config import SUDO_USERS
from config import PMPERMIT
from pyrogram import filters
from pyrogram.types import Message
from callsmusic.callsmusic import client as USER
PMSET =True
pchats = []
@USER.on_message(filters.text & filters.private & ~filters.me & ~filters.bot)
async def pmPermit(client: USER, message: Message):
if PMPERMIT == "ENABLE":
if PMSET:
chat_id = message.chat.id
if chat_id in pchats:
return
await USER.send_message(
message.chat.id,
"Merhaba, Müzik asistanı hizmetidir.\n 🧑🏻💻 Developer\n",
)
return
@Client.on_message(filters.command(["/pmpermit"]))
async def bye(client: Client, message: Message):
if message.from_user.id in SUDO_USERS:
global PMSET
text = message.text.split(" ", 1)
queryy = text[1]
if queryy == "on":
PMSET = True
await message.reply_text("PM İzin Etkin")
return
if queryy == "off":
PMSET = None
await message.reply_text("PM İzin Devre Dışı")
return
@USER.on_message(filters.text & filters.private & filters.me)
async def autopmPermiat(client: USER, message: Message):
chat_id = message.chat.id
if not chat_id in pchats:
pchats.append(chat_id)
await message.reply_text("Hey Userbot Yazışması artık başarılı.")
return
message.continue_propagation()
@USER.on_message(filters.command("a", [".", ""]) & filters.me & filters.private)
async def pmPermiat(client: USER, message: Message):
chat_id = message.chat.id
if not chat_id in pchats:
pchats.append(chat_id)
await message.reply_text("Yaklaşık olarak PM")
return
message.continue_propagation()
@USER.on_message(filters.command("da", [".", ""]) & filters.me & filters.private)
async def rmpmPermiat(client: USER, message: Message):
chat_id = message.chat.id
if chat_id in pchats:
pchats.remove(chat_id)
await message.reply_text("Bu şekilde PM")
return
message.continue_propagation()