Documentation
¶
Index ¶
- Variables
- type App
- func (app *App) AddNewCategory(category string)
- func (app *App) AddNewCommand(command Command)
- func (app *App) AddNewMiddleware(middleware context.MiddlewareFunc)
- func (app *App) Client() *whatsmeow.Client
- func (app *App) ClientJID() waTypes.JID
- func (app *App) FindMessageByID(jid waTypes.JID, id string) *events.Message
- func (app *App) GetAllChats() []*events.Message
- func (app *App) GetChatInJID(jid waTypes.JID) []*events.Message
- func (app *App) GetStatusMessages() []*events.Message
- func (app *App) HandleEvents(event interface{})
- func (app *App) InitializeClient() error
- func (app *App) SendMessage(to waTypes.JID, message *waProto.Message, extra ...whatsmeow.SendRequestExtra) (whatsmeow.SendResponse, error)
- func (app *App) Shutdown()
- func (app *App) UpsertMessages(jid waTypes.JID, message []*events.Message)
- type Command
- type Muxer
- func (muxer *Muxer) AddCommand(cmd *Command)
- func (muxer *Muxer) AddCommandParser(context func(str string) (prefix string, cmd string, ok bool))
- func (muxer *Muxer) AddGlobalMiddleware(middleware context.MiddlewareFunc)
- func (muxer *Muxer) AddMiddleware(middleware context.MiddlewareFunc)
- func (muxer *Muxer) CacheAllGroup()
- func (muxer *Muxer) Clean()
- func (muxer *Muxer) FindGroupByJid(groupJid waTypes.JID) (group *waTypes.GroupInfo, err error)
- func (muxer *Muxer) GenerateSuggestionModel()
- func (muxer *Muxer) GetActiveCommand() []*Command
- func (muxer *Muxer) GetActiveGlobalMiddleware() []context.MiddlewareFunc
- func (muxer *Muxer) GetActiveMiddleware() []context.MiddlewareFunc
- func (muxer *Muxer) GetAllGroups() (group []*waTypes.GroupInfo, err error)
- func (muxer *Muxer) IsClientGroupAdmin(chat waTypes.JID) (bool, error)
- func (muxer *Muxer) IsGroupAdmin(chat waTypes.JID, jid any) (bool, error)
- func (muxer *Muxer) RunCommand(c *whatsmeow.Client, evt *events.Message)
- func (muxer *Muxer) SendEmojiMessage(event *events.Message, emoji string)
- func (muxer *Muxer) SuggestCommand(event *events.Message, prefix, command string)
- func (muxer *Muxer) UnCacheOneGroup(info *events.GroupInfo, joined *events.JoinedGroup)
Constants ¶
This section is empty.
Variables ¶
View Source
var Categories types.Embed[string]
View Source
var Commands types.Embed[*Command]
View Source
var GlobalMiddlewares types.Embed[context.MiddlewareFunc]
View Source
var Middlewares types.Embed[context.MiddlewareFunc]
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AddNewCategory ¶
func (*App) AddNewCommand ¶
func (*App) AddNewMiddleware ¶
func (app *App) AddNewMiddleware(middleware context.MiddlewareFunc)
func (*App) FindMessageByID ¶
func (*App) GetAllChats ¶
func (*App) GetStatusMessages ¶
func (*App) HandleEvents ¶
func (app *App) HandleEvents(event interface{})
func (*App) InitializeClient ¶
func (*App) SendMessage ¶
func (app *App) SendMessage(to waTypes.JID, message *waProto.Message, extra ...whatsmeow.SendRequestExtra) (whatsmeow.SendResponse, error)
type Command ¶
type Muxer ¶
type Muxer struct { Options *options.Options `json:"options,omitempty"` Log waLog.Logger `json:"log,omitempty"` MessageTimeout time.Duration `json:"message_timeout,omitempty"` Categories *xsync.MapOf[string, string] `json:"categories,omitempty"` GlobalMiddlewares *xsync.MapOf[string, context.MiddlewareFunc] `json:"global_middlewares,omitempty"` Middlewares *xsync.MapOf[string, context.MiddlewareFunc] `json:"middlewares,omitempty"` Commands *xsync.MapOf[string, *Command] `json:"commands,omitempty"` CommandResponseCache *xsync.MapOf[string, *waProto.Message] `json:"command_response_cache,omitempty"` QuestionState *xsync.MapOf[string, *context.QuestionState] `json:"question_state,omitempty"` PollingState *xsync.MapOf[string, *context.PollingState] `json:"polling_state,omitempty"` GroupCache *xsync.MapOf[string, []*waTypes.GroupInfo] `json:"group_cache,omitempty"` Locals *xsync.MapOf[string, string] `json:"locals,omitempty"` QuestionChan chan *context.QuestionState `json:"question_chan,omitempty"` PollingChan chan *context.PollingState `json:"polling_chan,omitempty"` SuggestionModel *fuzzy.Model `json:"suggestion_model,omitempty"` CommandParser func(str string) (prefix string, cmd string, ok bool) `json:"command_parser,omitempty"` types.AppMethods }
func (*Muxer) AddCommand ¶
func (*Muxer) AddCommandParser ¶
func (*Muxer) AddGlobalMiddleware ¶
func (muxer *Muxer) AddGlobalMiddleware(middleware context.MiddlewareFunc)
func (*Muxer) AddMiddleware ¶
func (muxer *Muxer) AddMiddleware(middleware context.MiddlewareFunc)
func (*Muxer) CacheAllGroup ¶
func (muxer *Muxer) CacheAllGroup()
func (*Muxer) FindGroupByJid ¶
func (*Muxer) GenerateSuggestionModel ¶
func (muxer *Muxer) GenerateSuggestionModel()
func (*Muxer) GetActiveCommand ¶
func (*Muxer) GetActiveGlobalMiddleware ¶
func (muxer *Muxer) GetActiveGlobalMiddleware() []context.MiddlewareFunc
func (*Muxer) GetActiveMiddleware ¶
func (muxer *Muxer) GetActiveMiddleware() []context.MiddlewareFunc
func (*Muxer) GetAllGroups ¶
func (*Muxer) IsClientGroupAdmin ¶
func (*Muxer) IsGroupAdmin ¶
func (*Muxer) SendEmojiMessage ¶
func (*Muxer) SuggestCommand ¶
func (*Muxer) UnCacheOneGroup ¶
func (muxer *Muxer) UnCacheOneGroup(info *events.GroupInfo, joined *events.JoinedGroup)
Click to show internal directories.
Click to hide internal directories.