-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
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 started reviewing this and then realized that it may be a good idea revisit this during our Friday's sync -- do we actually need this or can use the built-in Slack reminder functionality.
src/sammich/plugins/reminder.py
Outdated
|
||
class ReminderPlugin(MachineBasePlugin): | ||
def parse_command(self, command_text): | ||
pattern = re.compile(r"\[(.*?)\]\s+\[(.+?)\]\s+\[(.+?)\]") |
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 suggest moving this to the module level and giving more descriptive name.
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.
Please check if its okay now !, thanks
Sure! lets discuss it tomorrow! |
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.
Could you fix the code style issues?
Wouldn't using the Slack-machine function be unnecessary since we still need the Slack API to retrieve Channel Object? The function would simply use the Channel object to return the names and IDs, which only requires two lines of code. Do we really need a separate function for this? |
Not sure what exactly you mean by that but I can surely add more details regarding my suggestion. I recommend using a consistent way while interacting with Slack API. In your case that would be slack-machine client. Only if that doesn't fit your need you should do manually crafted requests to the endpoints. |
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.
please check tests
No description provided.