go-telegram-bot-api/telegram-bot-api

Unmarshal error for banChatMember method

alexpts opened this issue · 3 comments

Docs: https://core.telegram.org/bots/api#banchatmember

Returns True on success.

func (bot *BotAPI) Send(c Chattable) (Message, error) {
	resp, err := bot.Request(c)
	if err != nil {
		return Message{}, err
	}

	var message Message
	err = json.Unmarshal(resp.Result, &message) // resp.Result = true => Unmarshal error and throw error to up

	return message, err
}

The same error when I call answerCallbackQuery

Looks like this project is inactive. I've forked & fixed this issue in this repo: https://github.com/huantt/telegram-bot-api

Great work @huantt - your fix looks good to me so I've gone ahead and switched my project to use your version. Saved me time having to fork and modify the source myself!

Annoying when you find an unmaintained project that is mostly great but has some glaring issues that are no longer being prioritized