Documentation ¶
Index ¶
- Constants
- Variables
- func CheckOperateableCommand(command string) bool
- func CheckValidCommand(command string) bool
- 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(bot *bot.Bot, inotify concern.Notify) []message.IMessageElement
- func (l *Lsp) PostInit()
- 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) 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) 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) DebugCheck() bool
- func (c *LspPrivateCommand) DefaultLogger() *logrus.Entry
- func (c *LspPrivateCommand) Execute()
- func (c *LspPrivateCommand) HelpCommand()
- func (c *LspPrivateCommand) LogCommand()
- func (c *LspPrivateCommand) PingCommand()
- type Runtime
- 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 = "reverse" ImageContentCommand = "ic" HelpCommand = "help" )
View Source
const ( PingCommand = "ping" LogCommand = "log" BlockCommand = "block" )
private command
View Source
const ModuleName = "me.sora233.Lsp"
Variables ¶
View Source
var Debug = false
Functions ¶
func CheckOperateableCommand ¶
func CheckValidCommand ¶
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 (*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) 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) 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) DebugCheck ¶
func (c *LspPrivateCommand) DebugCheck() bool
func (*LspPrivateCommand) DefaultLogger ¶
func (c *LspPrivateCommand) DefaultLogger() *logrus.Entry
func (*LspPrivateCommand) Execute ¶
func (c *LspPrivateCommand) Execute()
func (*LspPrivateCommand) HelpCommand ¶
func (c *LspPrivateCommand) HelpCommand()
func (*LspPrivateCommand) LogCommand ¶
func (c *LspPrivateCommand) LogCommand()
func (*LspPrivateCommand) PingCommand ¶
func (c *LspPrivateCommand) PingCommand()
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.