Skip to content
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

Documentation fix for setting channel #1

Merged
merged 1 commit into from
Apr 5, 2016
Merged

Documentation fix for setting channel #1

merged 1 commit into from
Apr 5, 2016

Conversation

JakeColtman
Copy link
Contributor

The docs show setting channel in the handle function, but doing this posts the message to the default channel #general (which led to an error for me). I've tried to preserve the original phrasing as much as possible in the update

See for reference the handle init function
'''
def init(self, trigger, channel=None, types=None, capture_return=True,
capture_stdout=True):
self.regexp = re.compile(trigger)
self.types = types
self.capture_return = capture_return
self.capture_stdout = capture_stdout
'''
where channel isn't recorded

The docs show setting channel in the handle function, but doing this posts the message to the default channel #general

See for reference the handle function 
'''
        def __init__(self, trigger, channel=None, types=None, capture_return=True,
                     capture_stdout=True):
            self.regexp = re.compile(trigger)
            self.types = types
            self.capture_return = capture_return
            self.capture_stdout = capture_stdout
'''
where channel isn't recorded
@sYnfo
Copy link
Owner

sYnfo commented Apr 5, 2016

Thanks for the PRs! :)

The idea was to set the default channel in the constructor, but to have the option to override it in the decorator. Apparently I didn't get to finish it yet.

@sYnfo sYnfo merged commit 7b21e68 into sYnfo:master Apr 5, 2016
@JakeColtman
Copy link
Contributor Author

Not at all, the thanks should be from me to you, I love the tool, I've been implementing some ChatOps with it today.

I'd guessed that was the intention, but I didn't have much time to add the full feature today. If I get some time I'll make a separate PR for it

@sYnfo
Copy link
Owner

sYnfo commented Apr 5, 2016

Coolio, that's great to hear! And if you have any feature request feel free to open an issue for it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants