Hi everyone🖐 Is there any way to stop a specific user

from sending messages to my bot? (In private chat, not channels or groups).
Looking for something like banning the user...

7 ответов

22 просмотра
Behnam-Mohammadi Автор вопроса
ッ Marshmallow 🎀 ❦ ᵐⁱˢˢ Σ ᶜᵒˡˡᵉᵍⁱᵃⁿ ᵃⁿᵈ ᵍᵃᵐᵉʳ 👱🏻‍♀ 🦋²⁰²²ᵗʰ 🎀 🧞‍♀️×͜×
In php i know

I've coded it in python but actually I was hoping for a method or something like that provided by telegram itself. You know something like banChatMember, but for private chats, not groups. Is there anything like that?

Behnam-Mohammadi Автор вопроса

Thanks for your help🌹 I just checked overflow too and I believe unfortunately telegram api doesn't provide such feature. I need to implement it in my code somehow

Behnam Mohammadi
Thanks for your help🌹 I just checked overflow too ...

Yes i answer you Check the message if from the user you need to ban ignored the reply Like this $from = $update->message->from->id; $ban = "id the user"; if($text == '/start' and $from != $ban){ Reply code }

Похожие вопросы

Карта сайта