Skip to content

'Bot.SendMessage' does not support target channel username #160

@liuwb

Description

@liuwb

Description of the problem / feature request

This is the method signature of 'SendMessage' function of Bot:

func (bot *Bot) SendMessage(chatId int64, text string, opts *SendMessageOpts) (*Message, error)

And the description of 'chatId' input parameter:

- chatId (type int64): Unique identifier for the target chat or username of the target channel (in the format @channelusername)

We have no way to pass channel username (which is a string), but only chat ID is supported.

Feature requests

Fix the generation tool to generate correct 'SendMessage' implementation code that accepts 'chatId' as integer or string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions