diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-29 16:57:53 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:52 +0100 |
commit | acaf2e81719ba160aac3bc7c3c78fc4db3d13f65 (patch) | |
tree | a23c4c04ac63987312ce2ff9bb6fc1351c887dfe /slack/main.py | |
parent | cdf3cfe4a2ed8a340ac1a8404e7cd7e604fe3857 (diff) | |
download | wee-slack-acaf2e81719ba160aac3bc7c3c78fc4db3d13f65.tar.gz |
Use class for shared, so we don't have to change usage when combining
Diffstat (limited to 'slack/main.py')
-rw-r--r-- | slack/main.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/slack/main.py b/slack/main.py index 667e108..9d31eac 100644 --- a/slack/main.py +++ b/slack/main.py @@ -1,20 +1,21 @@ import weechat -from slack import globals as G from slack.config import SlackWorkspace +from .shared import shared + async def init(): - print(G.workspaces) - if "wee-slack-test" not in G.workspaces: - G.workspaces["wee-slack-test"] = SlackWorkspace("wee-slack-test") - G.workspaces[ + 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") - G.workspaces[ + shared.workspaces[ "wee-slack-test" ].config.api_cookies.value = weechat.config_get_plugin("api_cookie") - workspace = G.workspaces["wee-slack-test"] + workspace = shared.workspaces["wee-slack-test"] print(workspace) print(workspace.config.slack_timeout.value) - print(G.config.color.reaction_suffix.value) + print(shared.config.color.reaction_suffix.value) |