diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-04-22 14:10:57 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-04-23 10:56:41 +0200 |
commit | b6e9853385e1be9fce27b61180f65c7971c9b44b (patch) | |
tree | 407323770cc6b811dc7668abe4144a4bb1f13e0b /wee_slack.py | |
parent | 4ef22a5dc6b7056e338ad219a70c20f5583ad54c (diff) | |
download | wee-slack-b6e9853385e1be9fce27b61180f65c7971c9b44b.tar.gz |
Print connected message after websocket is connected
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py index 64e11ac..ff83a44 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1101,6 +1101,7 @@ class SlackTeam(object): self.token = token self.team = self self.subteams = subteams + self.team_info = team_info self.subdomain = team_info["domain"] self.domain = self.subdomain + ".slack.com" self.preferred_name = self.domain @@ -1278,6 +1279,9 @@ class SlackTeam(object): def set_connected(self): self.connected = True + self.buffer_prnt('Connected to Slack team {} ({}) with username {}'.format( + self.team_info["name"], self.domain, self.nick)) + dbg("connected to {}".format(self.domain)) def set_disconnected(self): w.unhook(self.hook) @@ -2515,10 +2519,6 @@ def handle_rtmstart(login_data, eventrouter): t.connect() - t.buffer_prnt('Connected to Slack team {} ({}) with username {}'.format( - login_data["team"]["name"], t.domain, t.nick)) - dbg("connected to {}".format(t.domain)) - def handle_emojilist(emoji_json, eventrouter, **kwargs): if emoji_json["ok"]: |