diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-11-19 21:48:27 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 1358241a612980781bc7f80dec67bc8de74a3903 (patch) | |
tree | 3aa8b4be8cb7428d997881b54c3f630aa9445b8d /slack/init.py | |
parent | 0c599d0cd601bd491f4270a8ababab0ffe70b327 (diff) | |
download | wee-slack-1358241a612980781bc7f80dec67bc8de74a3903.tar.gz |
Add command to add workspace
Diffstat (limited to 'slack/init.py')
-rw-r--r-- | slack/init.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/slack/init.py b/slack/init.py index 8e1a433..ff95f57 100644 --- a/slack/init.py +++ b/slack/init.py @@ -1,5 +1,6 @@ import weechat +from slack.commands import register_commands from slack.config import SlackConfig, SlackWorkspace from slack.shared import shared from slack.task import create_task @@ -17,19 +18,20 @@ def shutdown_cb(): async def init(): - print(shared.workspaces) - if "wee-slack-test" not in shared.workspaces: - shared.workspaces["wee-slack-test"] = SlackWorkspace("wee-slack-test") - shared.workspaces[ - "wee-slack-test" - ].config.api_token.value = weechat.config_get_plugin("api_token") - shared.workspaces[ - "wee-slack-test" - ].config.api_cookies.value = weechat.config_get_plugin("api_cookie") - workspace = shared.workspaces["wee-slack-test"] - print(workspace) - print(workspace.config.slack_timeout.value) - print(shared.config.color.reaction_suffix.value) + pass + # print(shared.workspaces) + # if "wee-slack-test" not in shared.workspaces: + # shared.workspaces["wee-slack-test"] = SlackWorkspace("wee-slack-test") + # shared.workspaces[ + # "wee-slack-test" + # ].config.api_token.value = weechat.config_get_plugin("api_token") + # shared.workspaces[ + # "wee-slack-test" + # ].config.api_cookies.value = weechat.config_get_plugin("api_cookie") + # workspace = shared.workspaces["wee-slack-test"] + # print(workspace) + # print(workspace.config.slack_timeout.value) + # print(shared.config.color.reaction_suffix.value) def main(): @@ -46,4 +48,5 @@ def main(): shared.workspaces = {} shared.config = SlackConfig() shared.config.config_read() + register_commands() create_task(init(), final=True) |