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 ответов

9 просмотров

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

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

Обсуждают сегодня

Эх кто-то пришел и весь праздник испортил :( You need complex FBX scene importing setup to change things on import? good luck with that. You need navigation and pathfinding? g...
Serg Gini
5
я немного улучшил код, теперь такая картинка #0 0x0000000000000000 in ?? () #1 0x00007ffff7eba5bd in ?? () from /usr/lib/libraylib.so.450 #2 0x00007ffff7ed2990 in ?? () fro...
quantumde1 Зубенко
1
а как заказывать под глобальные буфера неинициализированную память? например если захочу M[] бахнуть побольше, но не занимать статически инициализированный объём в .wasm
Dmitry Ponyatov
2
А какой самый кросс-платформенный сейчас? Для простой 2Д пошаговой/мультиплеерной штуки допустим? Desktop/android/iOS/web/steam deck/vita/switch? Один кандидат Hipreme А rayl...
Serg Gini
2
Доброго времени суток. Сейчас я работаю над своей архитектурой Component / Systems. Если просто, это то что использовали до дробления на ECS. Потому что ECS это все таки нишев...
Vi
26
Для меня наследование это просто удобство ради удобства. Без множественного наследования, это бесполезная вещь, но удобная. С множественным наследованием, это опасная, но мощн...
Vi
1
while(true) {if(updates) {…}} типа нормальный вариант?)
Serg Gini
1
есть спецы по гитлабу? нужно решить проблему того, что гитлаб не показывает файлы с расширением txt в артефактах и предлагает их скачать и смотреть локально. а это неудобно. в...
Aleksandr Druzhinin
1
а как вообще D в плане написания SPA приложений? есть у кого-то опыт сборки веб-части через LDC -> asm.js/WASM ?
Dmitry Ponyatov
1
День добрый. Стандартная библиотека phobos (std.array) ссылается на внешнюю фунцию _d_newarrayUTrace и при сборке с ключом profile-gc эта ссылка остаётся неопределённой. Никак...
slacker linuxoid
5
Карта сайта