-
Notifications
You must be signed in to change notification settings - Fork 34
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
Improvements and fixes #18
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the contribution. Overall, it looks good to me, with the exception of the Also, I saw on PR #13 that you mentioned that this PR implements the same functionality, but as far as I can tell it still only allows room objects to be passed in to the constructor. Am I missing something here? |
Hi, What about this PR I dont think that exclusive flag is good idea, just specifying the rooms is enough.
In your code, room is a text ID in one place, and object in another. On line 35 if rooms is None, your code is appending room_id to "rooms" list, but else it assumes that "rooms" list contains room object and adding listeners for them. I just removed ambiguity and "rooms" contains room objects anyway, but it may be more useful if api accepted IDs or aliases, may be? |
Of course. The current way this is meant to be done is by calling the If users wish to send messages to a room without being triggered by a handler, it seems like the better solution is to pick out a room from the bot's
I hadn't considered this. If you agree with my previous comment, I think it would be good to replace your
Good catch. Could you explain the rationale for the print statement you added though? It doesn't seem particularly useful to me other than for library debugging purposes.
This, I believe, is what PR #13 implements. I do agree about the exclusive flag though, I'll ask for clarification on that from the author. |
Hello.
I 've made some improvements and refactored your code a little bit (made more pythonic i.e. "If var is None" -> just if var, changed deprecated api calls, etc)
Please review it.