Started REPL env for custom interactive shell
ONLY active when bot is running - Arguments [--watch] displays how many usses of each trigger and how many uses over the lifetime ofthe bot Commands - title [get/set] <newTitle> - category [get/set] <newCategory> - MUST be a legit Twitch.tv one - yet to come [cmd add|del|edit] [trigger] [response] (NOTE if you want Emotes you will have to type the 'name' in for twitch chat to recognise it)
This commit is contained in:
@@ -97,7 +97,13 @@ func HandleMessage(client *twitch.Client, apiClient interface{}, message twitch.
|
||||
// check perms
|
||||
for _, cmd := range commands.GetAllCommands() {
|
||||
if messageMatchesCommand(msg, botName, cmd) {
|
||||
// track usage: use first alias as key
|
||||
triggerKey := strings.ToLower(cmd.Triggers[0])
|
||||
commands.IncrementUsage(triggerKey)
|
||||
|
||||
if userHasPermission(user, cmd.Permission) {
|
||||
reply := ReplacePlaceholders(cmd.Replay, user.DisplayName, channel, botUsername)
|
||||
|
||||
client.Say(channel, cmd.Reply)
|
||||
} else {
|
||||
client.Say(channel, fmt.Sprintf("@%s You don't have permission to use this command.", user.DisplayName))
|
||||
|
Reference in New Issue
Block a user