Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.on.message_chat('id')
- @bot.on.message_chat('Id')
- async def wrapper(ans: Message):
- try:
- if ans.reply_message:
- if ans.reply_message.from_id < 0:
- await ans(f'Айди сообщества - @club{ans.reply_message.from_id * -1}')
- else:
- first = await bot.api.users.get(user_ids=ans.from_id)
- second = await bot.api.users.get(user_ids=ans.reply_message.from_id, name_case='nom')
- second_first = second[0]['first_name']
- second_last = second[0]['last_name']
- await ans(f'Айди пользователя - {second_first} {second_last} = @id{ans.reply_message.from_id}')
- else:
- await ans(f'Твой айди - @id{ans.from_id}')
- except:
- await ans('Неверный синтаксис.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement