My case is :
- I have a bot connected to appropriate IRC channels
- It actually communicates with an API through rest to interact with a database
- The API responds to the bot THEN the bot send messages to the appropriate user channel
Nothing too fancy.
As I dig dipper in my project, I’m wondering if it would not be a better solution to have the API send messages directly messages to the channel(s).
The pros I can think of :
- getting rid of the layer of the bot having to process the returned response of the API
- having all messages functions, internationalization etc in one project rather than scattered between API and bot
- PHP is easier to maintain for me
The cons :
- The API starts to be off of its supposed purpose
- I’ll have to had an extra flag when I (don’t) want the message to be posted to the channel
- opening and closing IRC connection each time i have a message to send is maybe bad practice, not performance friendly ?
Am I missing something ? thoughts on this are welcomed