from pyrogram import Client
from pyrogram import types, filters
CHANNEL_ID = -1001671895353
MY_CHANNEL = -1001766138888
app = Client(
"my_account",
api_id= numbers,
api_hash="hash"
)
@app.on_message(filters=filters.channel)
def my_handler(client: Client, message: types.Message):
if message.chat.id != CHANNEL_ID:
return
alarm = message.text
print(alarm)
app.run()