Any way to get a /ban @username command to work?

Mention entity doesn't give me user id and banChatMember only accepts user id.

10 ответов

28 просмотров

you would have to keep a database of usernames

cuebstro- Автор вопроса
dotvhs
you would have to keep a database of usernames

yeah but it's not possible to do that if the bot joins late after the creation of the group and the user doesn't post again. Ughh why is this restriction in place, why cant they just allow user id to be int or username for all group functions? So yeah, I think I will stick with a /ban as a reply to original message to do that. thanks

@encrypted_for i understand the reasoning behind of this, for example, username may change, be mistyped, or a case with a user without username, also, having multiple options of doing the same thing isnt good for api

cuebstro- Автор вопроса

@encrypted_for i understand the reasoning behind o...

So allow api users to provide only username and the server covers it to a user ID mention automatically

cuebstro- Автор вопроса

Also, the misstyping would only apply for manual user input, which is already available but for some reason the bot api doesn't allow it for programmatically doing it

ah, i thought you mean user delet/ban


ah, i thought you mean user delet/ban

Oh, and i didn't notice that you replied some other message 😁

cuebstro
Also, the misstyping would only apply for manual u...

how do you know what username to type after /ban command.. can you type my username without looking into profile🤤

cuebstro- Автор вопроса

how do you know what username to type after /ban c...

Oh yeah, you are right about that actually

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

Карта сайта