Respond with personality if in private chat without requiring name to appear

This commit is contained in:
Zachary Seguin 2017-06-02 22:52:28 -04:00
parent 463cb54488
commit bc1c015460
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ var (
func responseTemplate(re *regexp.Regexp, responses []string) (func(*bot.PassiveCmd) (string, error)) {
return func(command *bot.PassiveCmd) (string, error) {
if botRe.MatchString(command.Raw) && re.MatchString(command.Raw) {
if (command.ChannelData.IsPrivate || botRe.MatchString(command.Raw)) && re.MatchString(command.Raw) {
return fmt.Sprintf(responses[rand.Intn(len(responses))], command.User.Nick), nil
}
return "", nil