Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmarshal error for banChatMember method #705

Open
alexpts opened this issue Feb 20, 2024 · 3 comments
Open

Unmarshal error for banChatMember method #705

alexpts opened this issue Feb 20, 2024 · 3 comments

Comments

@alexpts
Copy link

alexpts commented Feb 20, 2024

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
}
@huantt
Copy link

huantt commented Mar 16, 2024

The same error when I call answerCallbackQuery

@huantt
Copy link

huantt commented Mar 17, 2024

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

@bakatz
Copy link

bakatz commented Apr 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants