Closed paskal closed 1 year ago
The restrictChatMember endpoint don't return a Message object. Maybe using BotAPI.Request()
method will suit better for this case? It also receives Chattable as argument but returns ApiResponse
It solves the issue, thanks a lot! I propose to update the documentation of RestrictChatMemberConfig
to reflect that.
Steps to reproduce:
git clone git@github.com:paskal/super-bot.git -b paskal/telegram_v5
docker-compose.yml
fillTELEGRAM_GROUP
with the ID of the supergroup (500+ members),TELEGRAM_TOKEN
with token of the bot which has admin rights in that groupdocker-compose up --build
wtf?
in that chatExpected result: the user is banned temporarily by the bot, with no errors from calling the
restrictChatMember
API. It works like that in v4, code:Observed result: the user is banned by the bot, but there is an error
json: cannot unmarshal bool into Go value of type tgbotapi.Message
. That started after migration from v4 to v5, code:Logs: