diff options
Diffstat (limited to 'slack/util.py')
-rw-r--r-- | slack/util.py | 6 |
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')}" |