Documentation ¶
Index ¶
- Variables
- type Bot
- func (b *Bot) Attach(a listener)
- func (b *Bot) GetID() int64
- func (b *Bot) Run() error
- func (b *Bot) SendGroupMsg(group int64, msg message.Msg) (int32, error)
- func (b *Bot) SendPrivateMsg(qq int64, msg message.Msg) (int32, error)
- func (b *Bot) SetGroupBan(GroupID, UserID, Duration int64) error
- func (b *Bot) Stop() error
- type FriendAddHandler
- type FriendRequest
- type GroupAddHandler
- type GroupBanHandler
- type GroupDecreaseHandler
- type GroupInviteHandler
- type GroupKickMeHandler
- type GroupLiftBanHandler
- type GroupMsgHandler
- type GroupRequest
- type PrivateMsgHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJsonUnmarshal = errors.New("JsonUnmarshalError")
ErrJsonUnmarshal json序列化中出错
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) SendGroupMsg ¶
SendGroupMsg 发送群聊消息(不含匿名消息)
func (*Bot) SendPrivateMsg ¶
SendPrivateMsg 发送私聊消息
type FriendAddHandler ¶
type FriendAddHandler struct { Priority int F func(request *FriendRequest) bool }
type FriendRequest ¶
func (*FriendRequest) Agree ¶
func (r *FriendRequest) Agree(remark string)
Agree 同意加好友请求,remark为对好友的备注
func (*FriendRequest) Reject ¶
func (r *FriendRequest) Reject()
type GroupAddHandler ¶
type GroupAddHandler struct { Priority int F func(request *GroupRequest) bool }
GroupAddHandler 加群申请
type GroupBanHandler ¶
type GroupBanHandler struct { Priority int F func(GroupID, OperatorID, UserID, Duration int64) bool }
GroupBanHandler 群禁言,duration单位为秒
type GroupDecreaseHandler ¶
GroupDecreaseHandler 群成员减少,包含成员主动退群,成员被踢;
主动退群时OperatorID==UserID,不相等则为被踢
type GroupInviteHandler ¶
type GroupInviteHandler struct { Priority int F func(request *GroupRequest) bool }
GroupInviteHandler 加群邀请
type GroupKickMeHandler ¶
GroupKickMeHandler 自己被踢出群聊
type GroupLiftBanHandler ¶
GroupLiftBanHandler 群解除禁言
type GroupMsgHandler ¶
type GroupMsgHandler struct { Priority int F func(MsgID int32, GroupID, UserID int64, Msg message.Msg) bool }
GroupMsgHandler 群聊消息(不含匿名消息)
type GroupRequest ¶
type GroupRequest struct { // 邀请/申请加群的人的qq号 UserID int64 // 受邀/申请加入的群号 GroupID int64 // 验证消息 Comment string // contains filtered or unexported fields }
GroupRequest 邀请/申请加群都用这个
func (*GroupRequest) Agree ¶
func (r *GroupRequest) Agree()
func (*GroupRequest) Reject ¶
func (r *GroupRequest) Reject(reason string)
Click to show internal directories.
Click to hide internal directories.