package telegram import ( "fmt" "time" ) // Account TG 账号信息 type Account struct { Phone string SessionFile string AppID int AppHash string } // ChannelInfo 频道基本信息 type ChannelInfo struct { Username string Title string MemberCount int About string IsChannel bool IsGroup bool } // Message TG 消息 type Message struct { ID int Text string ForwardFromChannel string // forward 来源频道用户名 Links []string // 消息中的 t.me 链接 IsService bool // 系统消息 } // UserInfo TG 用户信息(验证商户时用) type UserInfo struct { ID int64 Username string FirstName string LastName string IsBot bool IsPremium bool LastOnline *time.Time IsChannel bool IsGroup bool Exists bool // false 表示不存在/已注销 } // FloodWaitError FloodWait 错误,包含等待时长 type FloodWaitError struct { Seconds int } func (e *FloodWaitError) Error() string { return fmt.Sprintf("FloodWait: %d seconds", e.Seconds) }