second attempt at bot messages#2
Conversation
|
s/get/fetch/ # disambig |
| return; | ||
| } | ||
|
|
||
| if (message.bot_id == 'B42KVL3PF') { // CHANGEME |
There was a problem hiding this comment.
This bot ID should be stored in/loaded from the config.json file, and documentation added to the README. It may even be worth making it an array of bot IDs to ignore.
There was a problem hiding this comment.
I was rather hoping to not have to configure it at all, by finding our own id at runtime. Didn't find a function to do that, but maybe I didn't look enough. Alternatively, we could make a note of the messages we send, and match them up with messages we get back.
There was a problem hiding this comment.
I couldn't find a way of fetching our own bot ID either in the docs, and matching up our own messages would be fairly involved (from having a cursory glance at how the bot works) - being able to ignore a list of bot IDs would be an easy way to accomplish our goal in a way that doesn't involve hardcoding or significant refactoring.
|
This doesn't look like it's in a state to accept while there're things which are unsure or should be changed? @ultrafez if you have a recommendation, then can you do that suggestion, else if there's only the one bot then hard coding the ID seems appropriate? |
|
Ideally any changes that we make to slack-irc we would be able to submit back as a pull request to the original slack-irc project, and since it's an open source project we should hold it to a high standard (for us, and also for future contributors). I'm hoping to sync our fork of slack-irc back with the original project at some point, so any changes we make should be well written. We absolutely shouldn't be hardcoding any values; it's not difficult to load them from the config file (which already exists - it just needs a new key adding). |
|
@hexwab, do you want to make the change to add the bot ID to config? If not I can do it. |
Please go ahead. |
This actually works. But I have no idea how to get my own bot id :(