Documentation ¶
Index ¶
- type Bot
- func (b *Bot) Answer(m Msg, text string) (Msg, error)
- func (b *Bot) BanGroupMember(chatId int64, userId int, blockTime time.Duration) error
- func (b *Bot) BlockGroupMember(chatId int64, userId int) error
- func (b *Bot) GetAdminsByMsg(m Msg) ([]User, error)
- func (b *Bot) GetGroupMembers() ([]User, error)
- func (b *Bot) GetMe() (User, error)
- func (b *Bot) GetNewMsgChan() (MsgChan, error)
- func (b *Bot) IsMsgFromAdmin(m Msg) (bool, error)
- func (b *Bot) RemoveMsg(m Msg) error
- func (b *Bot) RemoveMsgById(chatId int64, msgId int) error
- func (b *Bot) Reply(m Msg, text string) (Msg, error)
- func (b *Bot) SendImageToPublicChannel(channelUserName, imageBuffer []byte) (Msg, error)
- func (b *Bot) SendTextToPrivateChannel(chatIdOfChannel int64, text string) (Msg, error)
- func (b *Bot) SendTextToPublicChannel(channelUserName, text string) (Msg, error)
- func (b *Bot) UnBanGroupMember(chatId int64, channelUsername, superGroupUsername string, userId int, ...) error
- func (b *Bot) UserHasAvatar(userId int) (bool, error)
- type ChatType
- type Group
- type Msg
- type MsgChan
- type MsgType
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) BanGroupMember ¶
加入黑名单并且禁言,但是仍然留在群里可以看不可以操作
func (*Bot) BlockGroupMember ¶
加入黑名单并且永久地踢出去(连看消息的权限都没有) 经测试发现:是否填写SuperGroupUsername或者ChannelUsername根本没有关系,ChatId却是必须的,没有ChatId只有群组名称,函数是没有效果的,也不报错 当然,也可能是测试不严谨的误判
func (*Bot) GetAdminsByMsg ¶
耗时较长 从消息查询消息出处的所有管理员
func (*Bot) GetNewMsgChan ¶
func (*Bot) SendImageToPublicChannel ¶
func (*Bot) SendTextToPrivateChannel ¶
Every private channel has a unique and solid chat id.
func (*Bot) SendTextToPublicChannel ¶
只有加入了群,才能发送消息到该群 channelUserName: for example, https://t.me/rich, the channel username is 'rich'.
func (*Bot) UnBanGroupMember ¶
Click to show internal directories.
Click to hide internal directories.