vocatwk / CodeU-Nemo

Chat web app for CodeU
Apache License 2.0
1 stars 3 forks source link

Nemo Bot Can Reply #101

Closed lealgamb closed 6 years ago

lealgamb commented 6 years ago

NemoBot can reply to messages now. Its map is initialized based on nemobot.txt, so feel free to edit the file if you want. Also, the key of the map is in lower case, and so is the message parsing, to account for user spelling/punctuation. The same regex that scans for @MentionKey is used to account for punctuation.

The main problem I see from this is what should happen when a user mentions multipled keywords. We can either have a restriction to only allow 1 keyword per message, or add n keywords in 1 message to a list and get all the replies into the bot's answer. What do you guys think?

I'll be working on tests for NemoBot soon, most likely in a different PR.

image

lealgamb commented 6 years ago

Yes, the bot self registers. Before, it could register multiple times. But now it only registers once thanks to having it in ServerStartupListener. I believe that this should solve the problem from earlier.

Sounds good for multiple keywords.

yebrahim commented 6 years ago

Let’s merge this and try a deployment then.

lealgamb commented 6 years ago

Should I merge this to BotBranch, then merge PR #93 to master?

yebrahim commented 6 years ago

Yes, if both PRs are ready for merging.

lealgamb commented 6 years ago

PR #93 still needs to be approved.