aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_workspace.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-29 21:15:15 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commitc643c84a253b3e98f5e0a1fc19855e948c84fc99 (patch)
tree9e593d86833a7aa3a831cdf74eb2e4e152214d32 /slack/slack_workspace.py
parenta91e003fcdb63e80172b2c001597f4042179d04e (diff)
downloadwee-slack-c643c84a253b3e98f5e0a1fc19855e948c84fc99.tar.gz
Add command /slack disconnect
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r--slack/slack_workspace.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index ac2b1e7..0e16920 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -249,3 +249,8 @@ class SlackWorkspace:
def ws_recv(self, data: object):
print(f"received: {data}")
+
+ def disconnect(self):
+ self.is_connected = False
+ weechat.unhook(self.hook)
+ self.ws.close()