Add API Context to Plugin Context

updated idea of @zbarahal’s PR (PR #20) to reflect the current master.
This commit is contained in:
philipyun103 2016-08-07 00:42:37 -07:00
parent f785ed9a14
commit 1fb557b178
4 changed files with 21 additions and 4 deletions

View file

@ -48,7 +48,7 @@ class RtmBot(object):
# initialize stateful fields
self.last_ping = 0
self.bot_plugins = []
self.slack_client = None
self.slack_client = SlackClient(self.token)
def _dbg(self, debug_string):
if self.debug:
@ -56,7 +56,6 @@ class RtmBot(object):
def connect(self):
"""Convenience method that creates Server instance"""
self.slack_client = SlackClient(self.token)
self.slack_client.rtm_connect()
def _start(self):