Skip to content
Advertisement

Is it possible with aiogram to know, who sent the message?

So the Telegram Bot can do different actions, depending on who activated the command. This concerns aiogram, a framework for Telegram Bot API

Advertisement

Answer

You could use a simple filtering system:

  1. Create a dict/database with user_id’s and their roles
  2. Get the role from that dict/db by id and do the action

This solution in code:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement