Kick User in Group - Telegram

(Rotakoi) #1

Is there any way I can kick someone In the group using the bot, the person I reply to with the command gets kicked

(Daniel Beckett) #2

Hi @Dishaan_Jain

There’s a post on the following link that could help with this:

(Rotakoi) #3

But I need it to read the user ID from the reply

(Daniel Beckett) #4

There’s not really a clear way to get a user’s ID from their username using the bot API for Telegram unfortunately. To have the ID they need to have an open conversation with the bot e.g. by triggering a flow by sending a new message trigger keyword.

(Levi) #5

Can you please gimme the code how to use the restrict function…and how to fetch user ID