GPQBot
1from pprint import pformat
2from typing import Any, Dict, Optional
3
4from pybotx.logger import trim_file_data_in_incoming_json
5
6from app.logger import logger
7
8
9def format_raw_command(raw_command: Optional[Dict[str, Any]]) -> str:
10if raw_command is None:
11logger.warning("Empty `raw_command`")
12return "<empty `raw_command`>"
13
14trimmed_raw_command = trim_file_data_in_incoming_json(raw_command)
15return pformat(trimmed_raw_command)