Documentation ¶
Index ¶
- Constants
- Variables
- func CheckOperateableCommand(command string) bool
- func CheckValidCommand(command string) bool
- func IConfigAtAllCmd(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigAtCmd(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigFilterCmdClear(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type)
- func IConfigFilterCmdNotType(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigFilterCmdShow(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type)
- func IConfigFilterCmdText(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigFilterCmdType(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigOfflineNotifyCmd(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IConfigTitleNotifyCmd(c *MessageContext, groupCode int64, id string, site string, ctype concern.Type, ...)
- func IEnable(c *MessageContext, groupCode int64, command string, disable bool)
- func IGrantCmd(c *MessageContext, groupCode int64, command string, grantTo int64, del bool)
- func IGrantRole(c *MessageContext, groupCode int64, grantRole permission.RoleType, ...)
- func IList(c *MessageContext, groupCode int64)
- func IWatch(c *MessageContext, groupCode int64, id string, site string, ...)
- func ReplyUserInfo(c *MessageContext, site string, id string)
- type KeySet
- type Lsp
- func (l *Lsp) ConcernNotify(bot *bot.Bot)
- func (l *Lsp) FreshIndex()
- func (l *Lsp) GetImageFromPool(options ...image_pool.OptionFunc) ([]image_pool.Image, error)
- func (l *Lsp) Init()
- func (l *Lsp) MiraiGoModule() bot.ModuleInfo
- func (l *Lsp) NotifyMessage(inotify concern.Notify) *message.SendingMessage
- func (l *Lsp) PostInit()
- func (l *Lsp) PostStart(bot *bot.Bot)
- func (l *Lsp) RemoveAllByGroup(groupCode int64)
- func (l *Lsp) Serve(bot *bot.Bot)
- func (l *Lsp) Start(bot *bot.Bot)
- func (l *Lsp) Stop(bot *bot.Bot, wg *sync.WaitGroup)
- type LspGroupCommand
- func (lgc *LspGroupCommand) CheckinCommand()
- func (lgc *LspGroupCommand) ConfigCommand()
- func (lgc *LspGroupCommand) DebugCheck() bool
- func (lgc *LspGroupCommand) DefaultLogger() *logrus.Entry
- func (lgc *LspGroupCommand) DefaultLoggerWithCommand(command string) *logrus.Entry
- func (lgc *LspGroupCommand) EnableCommand(disable bool)
- func (lgc *LspGroupCommand) Execute()
- func (lgc *LspGroupCommand) FaceCommand()
- func (lgc *LspGroupCommand) GrantCommand()
- func (lgc *LspGroupCommand) HelpCommand()
- func (lgc *LspGroupCommand) ImageContent()
- func (lgc *LspGroupCommand) ListCommand()
- func (lgc *LspGroupCommand) LspCommand()
- func (lgc *LspGroupCommand) NewMessageContext(log *logrus.Entry) *MessageContext
- func (lgc *LspGroupCommand) ReverseCommand()
- func (lgc *LspGroupCommand) RollCommand()
- func (lgc *LspGroupCommand) SetuCommand(r18 bool)
- func (lgc *LspGroupCommand) WatchCommand(remove bool)
- type LspPrivateCommand
- func (c *LspPrivateCommand) BlockCommand()
- func (c *LspPrivateCommand) ConfigCommand()
- func (c *LspPrivateCommand) DebugCheck() bool
- func (c *LspPrivateCommand) DefaultLogger() *logrus.Entry
- func (c *LspPrivateCommand) DefaultLoggerWithCommand(command string) *logrus.Entry
- func (c *LspPrivateCommand) EnableCommand(disable bool)
- func (c *LspPrivateCommand) Execute()
- func (c *LspPrivateCommand) GrantCommand()
- func (c *LspPrivateCommand) HelpCommand()
- func (c *LspPrivateCommand) ListCommand()
- func (c *LspPrivateCommand) LogCommand()
- func (c *LspPrivateCommand) NewMessageContext(log *logrus.Entry) *MessageContext
- func (c *LspPrivateCommand) PingCommand()
- func (c *LspPrivateCommand) SysinfoCommand()
- func (c *LspPrivateCommand) WatchCommand(remove bool)
- type MessageContext
- type Runtime
- type SourceType
- type StateManager
- func (s *StateManager) FreshIndex()
- func (s *StateManager) GetGroupInvitor(groupCode int64) (target int64, err error)
- func (s *StateManager) GetMessageImageUrl(groupCode int64, messageID int32) []string
- func (s *StateManager) IsMuted(groupCode int64, uin int64) bool
- func (s *StateManager) Muted(groupCode int64, uin int64, t int32) error
- func (s *StateManager) SaveGroupInvitor(groupCode int64, uin int64) error
- func (s *StateManager) SaveMessageImageUrl(groupCode int64, messageID int32, msgs []message.IMessageElement) error
- type Status
Constants ¶
View Source
const ( RollCommand = "roll" CheckinCommand = "签到" GrantCommand = "grant" LspCommand = "lsp" WatchCommand = "watch" UnwatchCommand = "unwatch" ListCommand = "list" SetuCommand = "色图" HuangtuCommand = "黄图" EnableCommand = "enable" DisableCommand = "disable" FaceCommand = "face" ReverseCommand = "倒放" ImageContentCommand = "ic" HelpCommand = "help" ConfigCommand = "config" )
View Source
const ( PingCommand = "ping" LogCommand = "log" BlockCommand = "block" SysinfoCommand = "sysinfo" )
private command
View Source
const ModuleName = "me.sora233.Lsp"
Variables ¶
View Source
var Debug = false
Functions ¶
func CheckOperateableCommand ¶
func CheckValidCommand ¶
func IConfigAtAllCmd ¶ added in v0.0.10
func IConfigAtCmd ¶ added in v0.0.13
func IConfigFilterCmdClear ¶ added in v0.0.14
func IConfigFilterCmdNotType ¶ added in v0.0.14
func IConfigFilterCmdShow ¶ added in v0.0.14
func IConfigFilterCmdText ¶ added in v0.0.14
func IConfigFilterCmdType ¶ added in v0.0.14
func IConfigOfflineNotifyCmd ¶ added in v0.0.13
func IConfigTitleNotifyCmd ¶ added in v0.0.13
func IEnable ¶ added in v0.0.7
func IEnable(c *MessageContext, groupCode int64, command string, disable bool)
func IGrantCmd ¶ added in v0.0.9
func IGrantCmd(c *MessageContext, groupCode int64, command string, grantTo int64, del bool)
func IGrantRole ¶ added in v0.0.9
func IGrantRole(c *MessageContext, groupCode int64, grantRole permission.RoleType, grantTo int64, del bool)
func IList ¶ added in v0.0.8
func IList(c *MessageContext, groupCode int64)
func ReplyUserInfo ¶ added in v0.0.13
func ReplyUserInfo(c *MessageContext, site string, id string)
Types ¶
type KeySet ¶
type KeySet struct{}
func (KeySet) GroupMessageImageKey ¶
func (KeySet) GroupMuteKey ¶
type Lsp ¶
type Lsp struct { PermissionStateManager *permission.StateManager LspStateManager *StateManager // contains filtered or unexported fields }
var Instance *Lsp
func (*Lsp) ConcernNotify ¶
func (*Lsp) FreshIndex ¶
func (l *Lsp) FreshIndex()
func (*Lsp) GetImageFromPool ¶
func (l *Lsp) GetImageFromPool(options ...image_pool.OptionFunc) ([]image_pool.Image, error)
func (*Lsp) MiraiGoModule ¶
func (l *Lsp) MiraiGoModule() bot.ModuleInfo
func (*Lsp) NotifyMessage ¶
func (l *Lsp) NotifyMessage(inotify concern.Notify) *message.SendingMessage
func (*Lsp) RemoveAllByGroup ¶
type LspGroupCommand ¶
type LspGroupCommand struct { *Runtime // contains filtered or unexported fields }
func NewLspGroupCommand ¶
func NewLspGroupCommand(bot *miraiBot.Bot, l *Lsp, msg *message.GroupMessage) *LspGroupCommand
func (*LspGroupCommand) CheckinCommand ¶
func (lgc *LspGroupCommand) CheckinCommand()
func (*LspGroupCommand) ConfigCommand ¶ added in v0.0.10
func (lgc *LspGroupCommand) ConfigCommand()
func (*LspGroupCommand) DebugCheck ¶
func (lgc *LspGroupCommand) DebugCheck() bool
func (*LspGroupCommand) DefaultLogger ¶
func (lgc *LspGroupCommand) DefaultLogger() *logrus.Entry
func (*LspGroupCommand) DefaultLoggerWithCommand ¶
func (lgc *LspGroupCommand) DefaultLoggerWithCommand(command string) *logrus.Entry
func (*LspGroupCommand) EnableCommand ¶
func (lgc *LspGroupCommand) EnableCommand(disable bool)
func (*LspGroupCommand) Execute ¶
func (lgc *LspGroupCommand) Execute()
func (*LspGroupCommand) FaceCommand ¶
func (lgc *LspGroupCommand) FaceCommand()
func (*LspGroupCommand) GrantCommand ¶
func (lgc *LspGroupCommand) GrantCommand()
func (*LspGroupCommand) HelpCommand ¶
func (lgc *LspGroupCommand) HelpCommand()
func (*LspGroupCommand) ImageContent ¶
func (lgc *LspGroupCommand) ImageContent()
func (*LspGroupCommand) ListCommand ¶
func (lgc *LspGroupCommand) ListCommand()
func (*LspGroupCommand) LspCommand ¶
func (lgc *LspGroupCommand) LspCommand()
func (*LspGroupCommand) NewMessageContext ¶ added in v0.0.10
func (lgc *LspGroupCommand) NewMessageContext(log *logrus.Entry) *MessageContext
func (*LspGroupCommand) ReverseCommand ¶
func (lgc *LspGroupCommand) ReverseCommand()
func (*LspGroupCommand) RollCommand ¶
func (lgc *LspGroupCommand) RollCommand()
func (*LspGroupCommand) SetuCommand ¶
func (lgc *LspGroupCommand) SetuCommand(r18 bool)
func (*LspGroupCommand) WatchCommand ¶
func (lgc *LspGroupCommand) WatchCommand(remove bool)
type LspPrivateCommand ¶
type LspPrivateCommand struct { *Runtime // contains filtered or unexported fields }
func NewLspPrivateCommand ¶
func NewLspPrivateCommand(bot *miraiBot.Bot, l *Lsp, msg *message.PrivateMessage) *LspPrivateCommand
func (*LspPrivateCommand) BlockCommand ¶
func (c *LspPrivateCommand) BlockCommand()
func (*LspPrivateCommand) ConfigCommand ¶ added in v0.0.10
func (c *LspPrivateCommand) ConfigCommand()
func (*LspPrivateCommand) DebugCheck ¶
func (c *LspPrivateCommand) DebugCheck() bool
func (*LspPrivateCommand) DefaultLogger ¶
func (c *LspPrivateCommand) DefaultLogger() *logrus.Entry
func (*LspPrivateCommand) DefaultLoggerWithCommand ¶ added in v0.0.7
func (c *LspPrivateCommand) DefaultLoggerWithCommand(command string) *logrus.Entry
func (*LspPrivateCommand) EnableCommand ¶ added in v0.0.7
func (c *LspPrivateCommand) EnableCommand(disable bool)
func (*LspPrivateCommand) Execute ¶
func (c *LspPrivateCommand) Execute()
func (*LspPrivateCommand) GrantCommand ¶ added in v0.0.9
func (c *LspPrivateCommand) GrantCommand()
func (*LspPrivateCommand) HelpCommand ¶
func (c *LspPrivateCommand) HelpCommand()
func (*LspPrivateCommand) ListCommand ¶ added in v0.0.8
func (c *LspPrivateCommand) ListCommand()
func (*LspPrivateCommand) LogCommand ¶
func (c *LspPrivateCommand) LogCommand()
func (*LspPrivateCommand) NewMessageContext ¶ added in v0.0.9
func (c *LspPrivateCommand) NewMessageContext(log *logrus.Entry) *MessageContext
func (*LspPrivateCommand) PingCommand ¶
func (c *LspPrivateCommand) PingCommand()
func (*LspPrivateCommand) SysinfoCommand ¶ added in v0.0.8
func (c *LspPrivateCommand) SysinfoCommand()
func (*LspPrivateCommand) WatchCommand ¶ added in v0.0.7
func (c *LspPrivateCommand) WatchCommand(remove bool)
type MessageContext ¶ added in v0.0.9
type MessageContext struct { TextReply func(text string) interface{} Reply func(sendingMessage *message.SendingMessage) interface{} Send func(sendingMessage *message.SendingMessage) interface{} NoPermissionReply func() interface{} DisabledReply func() interface{} Lsp *Lsp Log *logrus.Entry Sender *message.Sender Source SourceType }
func NewMessageContext ¶ added in v0.0.9
func NewMessageContext() *MessageContext
func (*MessageContext) IsFromGroup ¶ added in v0.0.13
func (c *MessageContext) IsFromGroup() bool
func (*MessageContext) IsFromPrivate ¶ added in v0.0.13
func (c *MessageContext) IsFromPrivate() bool
type Runtime ¶
func (*Runtime) ParseRawSite ¶ added in v0.0.7
type SourceType ¶ added in v0.0.13
type SourceType int
const ( SourceTypeGroup SourceType = iota SourceTypePrivate )
type StateManager ¶
func NewStateManager ¶
func NewStateManager() *StateManager
func (*StateManager) FreshIndex ¶
func (s *StateManager) FreshIndex()
func (*StateManager) GetGroupInvitor ¶
func (s *StateManager) GetGroupInvitor(groupCode int64) (target int64, err error)
func (*StateManager) GetMessageImageUrl ¶
func (s *StateManager) GetMessageImageUrl(groupCode int64, messageID int32) []string
func (*StateManager) Muted ¶
func (s *StateManager) Muted(groupCode int64, uin int64, t int32) error
func (*StateManager) SaveGroupInvitor ¶
func (s *StateManager) SaveGroupInvitor(groupCode int64, uin int64) error
func (*StateManager) SaveMessageImageUrl ¶
func (s *StateManager) SaveMessageImageUrl(groupCode int64, messageID int32, msgs []message.IMessageElement) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.