Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.on.message_chat('реши <what>')
- @bot.on.message_chat('Реши <what>')
- async def math(ans: Message, what):
- try:
- user = await bot.api.users.get(user_ids=ans.from_id)
- firstname = user[0]['first_name']
- await ans (f'{firstname}, ' + 'Ответ: ' + str(eval(what)))
- except:
- user = await bot.api.users.get(user_ids=ans.from_id)
- firstname = user[0]['first_name']
- await ans(f'{firstname}, неверный пример!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement