Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fallback when dobot hears trigger word in #events #91

Open
AverageMarcus opened this issue Oct 1, 2018 · 3 comments
Open

Use fallback when dobot hears trigger word in #events #91

AverageMarcus opened this issue Oct 1, 2018 · 3 comments

Comments

@AverageMarcus
Copy link
Member

#90 (comment)

When Dobot hears it's trigger work in #events that doesn't include a meetup it should use the fallback and announce the next upcoming.

@danielthepope
Copy link
Member

I don't think checking the #events channel is the right thing to do here. Instead I think checking for "when is the next" can be checked with a fallback. Have we every had any incorrect Dobot responses from that phrase?

@Drarok
Copy link
Contributor

Drarok commented Oct 1, 2018

But that would break if people ask "When is JSOxford"… 🤔

@Drarok
Copy link
Contributor

Drarok commented Oct 1, 2018

I figure it'd make sense to require a "when…" or "what…" prefix? At the minute, it's aiming to respond to "is there a jsoxford meetup", but the regex is super lax, and matches "is there a something".

Edit: Not to mention the latter half of the regex is totally pointless and doesn't do anything:

/^(?:when|what)(?:.?s| is) the next (.*)(?:meet up|meetup|event|talk|party|hack|shindig|gathering|meeting|happening)?/i
/^(?:are|is) there (?:any|a) (.*)(?:meet up|meetup|event|talk|party|hack|shindig|gathering|meeting|happening)?/i
/(?:when|what)(?:.?s| is) the next (.*)(?:meet up|meetup|event|talk|party|hack|shindig|gathering|meeting|happening)?/i

All of these list a bunch of synonyms for meetup, then the final ? makes the entire group optional.

Edit the second: Wait, it's not totally pointless. It's to allow for "when's the next jsoxford", as well as "when' the next whatever meetup" – though you could handle that with a well-placed $ perhaps… 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants