Skip to content

Proposal: Special ChatID type to describe Recipient only by its integer ID #263

@demget

Description

@demget

Something like ChatID helper type which is actually int64 that implements Recipient interface and returns itself. It would make work with specific chat IDs much easier.

Before:

type Config struct {
    AdminGroupID int64
}

b.Send(&tb.Chat{ID: conf.AdminGroupID}, "message")

After:

type Config struct {
    AdminGroup tb.ChatID
}

b.Send(conf.AdminGroup, "message")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions