Documentation ¶
Index ¶
- func CanTrigger(currentUserName string, currentUserID string, rule models.Rule, ...) bool
- func ExecArgTokenizer(stripped string) []string
- func GetRoomIDs(wantRooms []string, bot *models.Bot) []string
- func IsSet(s ...string) bool
- func MakeNiceJSON(in map[string]any) map[string]any
- func Match(pattern, value string, trimValue bool) (string, bool)
- func RuleArgTokenizer(stripped string) []string
- func Substitute(value string, tokens map[string]string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanTrigger ¶
func CanTrigger(currentUserName string, currentUserID string, rule models.Rule, bot *models.Bot) bool
CanTrigger ensures the user is allowed to use the respective rule.
func ExecArgTokenizer ¶
ExecArgTokenizer goes through a string and tokenizes as parameters for use when executing a script (respecting empty arguments).
func GetRoomIDs ¶
GetRoomIDs helps find a room by name, if we have 'cached' it.
func IsSet ¶
IsSet is a helper function to check whether any of the supplied strings are empty or unsubstituted (ie. still in ${<string>} format).
func MakeNiceJSON ¶
MakeNiceJSON exists to address https://github.com/go-yaml/yaml/issues/139
func RuleArgTokenizer ¶
RuleArgTokenizer goes through a string and tokenizes as parameters for use when identifying rules to be triggered (ignoring empty arguments).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.