Documentation ¶
Index ¶
- func Finalize()
- func Init(logCfg *config.LogConfig)
- type Bot
- func (b *Bot) Api() *api.Sender
- func (b *Bot) Close()
- func (b *Bot) DeleteMsg(messageId qq.MessageId) error
- func (b *Bot) GetForwardMsg(id string) (*message.Chain, error)
- func (b *Bot) GetFriendList() ([]qq.BasicFriend, error)
- func (b *Bot) GetGroupHonorInfo(groupId qq.GroupId) (*api.Resp[api.RespDataGroupHonorInfo], error)
- func (b *Bot) GetGroupInfo(groupId qq.GroupId, noCache bool) (*qq.Group, error)
- func (b *Bot) GetGroupList() ([]qq.Group, error)
- func (b *Bot) GetGroupMemberInfo(groupId qq.GroupId, userId qq.UserId, noCache bool) (*qq.GroupUser, error)
- func (b *Bot) GetGroupMemberList(groupId qq.GroupId) (*api.Resp[api.RespDataGroupMemberList], error)
- func (b *Bot) GetLoginInfo() (*qq.BasicUser, error)
- func (b *Bot) GetMsg(messageId qq.MessageId) (*api.RespDataMessage, error)
- func (b *Bot) GetStrangerInfo(userId qq.UserId, noCache bool) (*qq.User, error)
- func (b *Bot) Id() qq.UserId
- func (b *Bot) LeaveGroup(groupId qq.GroupId, isDismiss bool) error
- func (b *Bot) Logger() *BotLogger
- func (b *Bot) Nickname() string
- func (b *Bot) RegisterCommand(c event.ICommand)
- func (b *Bot) RegisterHandler(h event.Handler)
- func (b *Bot) RegisterHandlerGroupMessage(h event.Handler)
- func (b *Bot) RegisterHandlerMeta(h event.Handler)
- func (b *Bot) RegisterHandlerNotice(h event.Handler)
- func (b *Bot) RegisterHandlerPrivateMessage(h event.Handler)
- func (b *Bot) RegisterHandlerRequest(h event.Handler)
- func (b *Bot) SendGroupMsg(groupId qq.GroupId, message *message.Chain) (qq.MessageId, error)
- func (b *Bot) SendGroupMsgString(groupId qq.GroupId, message string, autoEscape bool) (qq.MessageId, error)
- func (b *Bot) SendLike(userId qq.UserId, times int) error
- func (b *Bot) SendMsg(msg api.SendMsgReqParams, autoEscape bool) (qq.MessageId, error)
- func (b *Bot) SendPrivateMsg(userId qq.UserId, message *message.Chain) (qq.MessageId, error)
- func (b *Bot) SendPrivateMsgString(userId qq.UserId, message string, autoEscape bool) (qq.MessageId, error)
- func (b *Bot) SendRaw(action api.Action, params map[string]any) (api.IResp, error)
- func (b *Bot) SendRawString(msg string)
- func (b *Bot) SetFriendAddRequest(flag string, approve bool, remark string) error
- func (b *Bot) SetGlobalCommandPrefix(prefix string)
- func (b *Bot) SetGroupAddRequest(flag string, subType string, approve bool, reason string) error
- func (b *Bot) SetGroupAdmin(groupId qq.GroupId, userId qq.UserId, enable bool) error
- func (b *Bot) SetGroupAnonymous(groupId qq.GroupId, enable bool) error
- func (b *Bot) SetGroupAnonymousBan(groupId qq.GroupId, anonymous *qq.AnonymousData, duration int) error
- func (b *Bot) SetGroupBan(groupId qq.GroupId, userId qq.UserId, duration int) error
- func (b *Bot) SetGroupCard(groupId qq.GroupId, userId qq.UserId, card string) error
- func (b *Bot) SetGroupKick(groupId qq.GroupId, userId qq.UserId, rejectAddRequest bool) error
- func (b *Bot) SetGroupName(groupId qq.GroupId, name string) error
- func (b *Bot) SetGroupSpecialTitle(groupId qq.GroupId, userId qq.UserId, title string, duration int) error
- func (b *Bot) SetGroupWholeBan(groupId qq.GroupId, enable bool) error
- func (b *Bot) Start() error
- type BotLogger
- func (b *BotLogger) Debug(msg string, fields ...zap.Field)
- func (b *BotLogger) Error(msg string, fields ...zap.Field)
- func (b *BotLogger) Fatal(msg string, fields ...zap.Field)
- func (b *BotLogger) Info(msg string, fields ...zap.Field)
- func (b *BotLogger) Log(level zapcore.Level, msg string, fields ...zap.Field)
- func (b *BotLogger) Panic(msg string, fields ...zap.Field)
- func (b *BotLogger) SyncLogger()
- func (b *BotLogger) Warn(msg string, fields ...zap.Field)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) GetFriendList ¶
func (b *Bot) GetFriendList() ([]qq.BasicFriend, error)
func (*Bot) GetGroupHonorInfo ¶
func (*Bot) GetGroupInfo ¶
func (*Bot) GetGroupMemberInfo ¶
func (*Bot) GetGroupMemberList ¶
func (*Bot) GetStrangerInfo ¶
func (*Bot) RegisterCommand ¶
func (*Bot) RegisterHandler ¶
func (*Bot) RegisterHandlerGroupMessage ¶
func (*Bot) RegisterHandlerMeta ¶
func (*Bot) RegisterHandlerNotice ¶
func (*Bot) RegisterHandlerPrivateMessage ¶
func (*Bot) RegisterHandlerRequest ¶
func (*Bot) SendGroupMsg ¶
func (*Bot) SendGroupMsgString ¶
func (*Bot) SendPrivateMsg ¶
func (*Bot) SendPrivateMsgString ¶
func (*Bot) SendRawString ¶
func (*Bot) SetFriendAddRequest ¶
func (*Bot) SetGlobalCommandPrefix ¶
func (*Bot) SetGroupAddRequest ¶
func (*Bot) SetGroupAdmin ¶
func (*Bot) SetGroupAnonymous ¶
func (*Bot) SetGroupAnonymousBan ¶
func (*Bot) SetGroupBan ¶
func (*Bot) SetGroupCard ¶
func (*Bot) SetGroupKick ¶
func (*Bot) SetGroupSpecialTitle ¶
func (*Bot) SetGroupWholeBan ¶
Click to show internal directories.
Click to hide internal directories.