Answer the question
In order to leave comments, you need to log in
How to create a team on pyrogram?
Hello, I'm a beginner "pythonist", I wanted to make a command, when sending it, a text was sent to me in private messages.
My version:
from pyrogram import Client
api_id = id
api_hash = "hash"
with Client("my_account", api_id, api_hash) as app:
def main():
app.on_message(filters.command(["texts"], prefixes="."))
app.send_message("me", "test pyrogram", disable_web_page_preview=True)
app.run()
Answer the question
In order to leave comments, you need to log in
Compare with example
from pyrogram import Client, filters
app = Client("my_account")
@app.on_message(filters.text & filters.private)
def echo(client, message):
message.reply_text(message.text)
app.run() # Automatically start() and idle()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question