Skip to content

Unmarshal error for banChatMember method #705

@alexpts

Description

@alexpts

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions