-
Notifications
You must be signed in to change notification settings - Fork 1
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
second attempt at bot messages #2
base: mirror_image
Are you sure you want to change the base?
Conversation
s/get/fetch/ # disambig |
@@ -251,6 +251,11 @@ class Bot { | |||
return; | |||
} | |||
|
|||
if (message.bot_id == 'B42KVL3PF') { // CHANGEME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :(