Documentation ¶
Index ¶
- Constants
- func NewClient(svc *service.Service, empty1, empty2, botToken string, ...) (service.Networker, error)
- func NewService(tp service.Transporter) *service.Service
- type Client
- func (client *Client) Close() error
- func (client *Client) Closed() bool
- func (client *Client) CmdHandler(msg *stdchat.CmdMsg)
- func (client *Client) ConnID() string
- func (client *Client) Context() context.Context
- func (client *Client) GetGroup(id string) *Group
- func (client *Client) GetGroups() []*Group
- func (client *Client) GetStateInfo() service.ClientStateInfo
- func (client *Client) Handler(msg *stdchat.ChatMsg)
- func (client *Client) Logout(reason string) error
- func (client *Client) NetworkID() string
- func (client *Client) NetworkName() string
- func (client *Client) Ready() bool
- func (client *Client) Start(ctx context.Context, id string) error
- type Group
- type Member
Constants ¶
View Source
const Protocol = "tgbot"
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(tp service.Transporter) *service.Service
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CmdHandler ¶
func (client *Client) CmdHandler(msg *stdchat.CmdMsg)
func (*Client) GetStateInfo ¶
func (client *Client) GetStateInfo() service.ClientStateInfo
func (*Client) NetworkName ¶
type Group ¶
type Group struct { Info stdchat.EntityInfo // contains filtered or unexported fields }
Group is a tgbot group, channel, etc. TODO: isAdmin, isBot, ... and add them to member Values.
func (*Group) GetMembersInfo ¶
func (group *Group) GetMembersInfo() []stdchat.MemberInfo
func (*Group) GetPhoto ¶
GetPhoto returns photo URL and photo thumbnail URL. Both or thumb can be empty.
func (*Group) GetStateInfo ¶
func (group *Group) GetStateInfo() stdchat.SubscriptionStateInfo
Click to show internal directories.
Click to hide internal directories.