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

slack_client.api_call -> slackclient.api_call #4

Open
dopatraman opened this issue Dec 5, 2016 · 1 comment
Open

slack_client.api_call -> slackclient.api_call #4

dopatraman opened this issue Dec 5, 2016 · 1 comment

Comments

@dopatraman
Copy link

this

    slack_client.api_call("chat.postMessage", channel=channel,
                          text=response, as_user=True)

should be

    slackclient.api_call("chat.postMessage", channel=channel,
                          text=response, as_user=True)

right?

@SteveChristian70
Copy link

SteveChristian70 commented Dec 12, 2016

@dopatraman Technically No, using slackclient.api_call is not correct for this case. If you look at line 14 we set the slack_client variable to SlackClient(os.environ.get('SLACK_BOT_TOKEN')) So then when we call that variable you would use slack_client.api_call because that is the variable name we assigned on line 14. As you probably know you can assign almost any name to a variable, so if you had set the variable name to sc you would call that variable using sc.

sc.api_call("chat.postMessage", channel=channel,
                          text=response, as_user=True)```

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

No branches or pull requests

2 participants