Skip to content

Can't send messages to supergroups using supergroup's @username #74

@thesharp

Description

@thesharp

If you are trying to send a message to supergroup via it's @username instead of chat_id, botogram fails with this error:

16:34.42 -  WARNING  - Chat 0 is not available to your bot:
16:34.42 -  WARNING  - The chat with ID 0 doesn't exist
16:34.42 -  WARNING  - Update #979264137 processing aborted!

Last time it worked in 0.2.2 release. It's been broken since commit 9e142ea

Now if botogram detects string as chat_id it thinks that we are going to send our message to the telegram channel, which has slightly different Telegram API call, where we need to specify "id": 0, "type": "channel".

Because both supergroups and channels have string ids but different API calls, I can't think of any good workaround. The ugly thing would be to make a separate method for sending to supergroups by @username.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions