diff options
Diffstat (limited to 'slack')
-rw-r--r-- | slack/commands.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/slack/commands.py b/slack/commands.py index 457d43e..41abbde 100644 --- a/slack/commands.py +++ b/slack/commands.py @@ -1,5 +1,6 @@ from __future__ import annotations +import pprint import re from dataclasses import dataclass from functools import wraps @@ -211,6 +212,21 @@ def command_slack_workspace_del( ) +@weechat_command("tasks|buffer") +def command_slack_debug( + buffer: str, args: List[str], options: Dict[str, Optional[str]] +): + if args[0] == "tasks": + weechat.prnt("", "Active tasks:") + weechat.prnt("", pprint.pformat(shared.active_tasks)) + weechat.prnt("", "Active futures:") + weechat.prnt("", pprint.pformat(shared.active_futures)) + elif args[0] == "buffer": + conversation = get_conversation_from_buffer_pointer(buffer) + if conversation: + weechat.prnt("", f"Conversation id: {conversation.id}") + + def completion_slack_workspaces_cb( data: str, completion_item: str, buffer: str, completion: str ) -> int: |