Skip to content

Commit 0e1d91a

Browse files
committed
robot: revise hte invocations
Require a nonzero amount of space between the syntactic marker and the prompt. Fixes #93.
1 parent f19fab1 commit 0e1d91a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

privmsg.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,14 @@ var twitchAny = []twitchCommand{
435435
name: "contact",
436436
},
437437
{
438-
parse: regexp.MustCompile(`^(?i:say|generate)\s*(?i:something)?\s*(?i:starting)?\s*(?i:with)?\s*(?<prompt>.*)`),
438+
parse: regexp.MustCompile(`^(?i:say|generate)\s*(?i:something)?\s*(?i:starting)?\s*(?i:with)?\s+(?<prompt>.*)`),
439439
fn: command.Speak,
440440
name: "speak",
441441
},
442442
{
443443
// NOTE(zeph): This command MUST be after the normal speak command,
444444
// because it would capture the correct spelling otherwise.
445-
parse: regexp.MustCompile(`^(?i:a*s[say]*|e*g[gen]*[er]*[ae]*[te]*)\s*(?<prompt>.*)`),
445+
parse: regexp.MustCompile(`^(?i:a*s[say]*|e*g[gen]*[er]*[ae]*[te]*)\s+(?<prompt>.*)`),
446446
fn: command.Hte,
447447
name: "hte",
448448
},

0 commit comments

Comments
 (0)