Skip to content

Commit

Permalink
robot: revise hte invocations
Browse files Browse the repository at this point in the history
Require a nonzero amount of space between the syntactic marker and
the prompt.

Fixes #93.
  • Loading branch information
zephyrtronium committed Dec 14, 2024
1 parent f19fab1 commit 0e1d91a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions privmsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@ var twitchAny = []twitchCommand{
name: "contact",
},
{
parse: regexp.MustCompile(`^(?i:say|generate)\s*(?i:something)?\s*(?i:starting)?\s*(?i:with)?\s*(?<prompt>.*)`),
parse: regexp.MustCompile(`^(?i:say|generate)\s*(?i:something)?\s*(?i:starting)?\s*(?i:with)?\s+(?<prompt>.*)`),
fn: command.Speak,
name: "speak",
},
{
// NOTE(zeph): This command MUST be after the normal speak command,
// because it would capture the correct spelling otherwise.
parse: regexp.MustCompile(`^(?i:a*s[say]*|e*g[gen]*[er]*[ae]*[te]*)\s*(?<prompt>.*)`),
parse: regexp.MustCompile(`^(?i:a*s[say]*|e*g[gen]*[er]*[ae]*[te]*)\s+(?<prompt>.*)`),
fn: command.Hte,
name: "hte",
},
Expand Down

0 comments on commit 0e1d91a

Please sign in to comment.