aboutsummaryrefslogtreecommitdiffstats
path: root/slack/util.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-11-19 23:05:11 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit734e76aea266632643f4c5df49b8ab34ffc403d0 (patch)
tree83c1e8c3288a52875ad32e025781f856003c6b86 /slack/util.py
parent1358241a612980781bc7f80dec67bc8de74a3903 (diff)
downloadwee-slack-734e76aea266632643f4c5df49b8ab34ffc403d0.tar.gz
Add command to list workspaces
Diffstat (limited to 'slack/util.py')
-rw-r--r--slack/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/slack/util.py b/slack/util.py
index 507978d..c6cb57d 100644
--- a/slack/util.py
+++ b/slack/util.py
@@ -1,8 +1,14 @@
from typing import Any, Callable
+import weechat
+
from slack.shared import shared
def get_callback_name(callback: Callable[..., Any]) -> str:
shared.weechat_callbacks[callback.__name__] = callback
return callback.__name__
+
+
+def with_color(color: str, string: str):
+ return f"{weechat.color(color)}{string}{weechat.color('reset')}"