Z
Z
Zohan1Gear2022-03-30 20:16:44
Bots
Zohan1Gear, 2022-03-30 20:16:44

How to correct pyrogram python code?

Python code. How to display the username of all users (live users) in a telegram chat? By the command of any user in the chat /tag . What's wrong here?
Tell me pliiiz!

spoiler
from pyrogram import Client, filters

bot = Client('Bot')
# Get first 200 recent members
@bot.on_message(filters.command('start', 'tag', 'all'))
def start(bot, msg):
bot.send_message(bot.chat.get_members(),'Вот они')

bot.run()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Kravchuk, 2022-03-30
@Zohan1Gear

Telegram Bot API does not have access to chat members.
You need to use the Telegram API (look in the direction of the Telethon library).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question