Closed sethetter closed 2 years ago
Yeah an EventEmitter makes a lot of sense!
Alright I have a basic thing working here but I'm curious whether to focus on the event handler portion or the slash commands. Would it be easiest to just focus on the app_mention
event and parsing out the message that is received? Then we don't have to mess with the slack app configuration any time we want to add capabilities to the bot.
Thoughts?
Yep I think listening for mentions is the way to go here!
@KalebMills alright I think this is ready for review. I know it's a lot of change, sorry about that! Things are now set up so that "commands" are specifically things sent to the bot in app_mention
events.
We also need to update the .env.default
CONF_FILE
to local
so folx can spin it right up with the PhonyClient
I was thinking maybe the PhonyClient implements an event emitter or something under the hood. That way, it's super easy to test, and we can test commands through the client as well. Thoughts?