MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / validate_bot_name

Function validate_bot_name

scripts/setup_slack.py:55–65  ·  view source on GitHub ↗

Validate bot name for Slack app naming constraints.

(name: str)

Source from the content-addressed store, hash-verified

53
54
55def validate_bot_name(name: str) -> tuple[bool, str]:
56 """Validate bot name for Slack app naming constraints."""
57 if len(name) < 2:
58 return False, "Name must be at least 2 characters"
59 if len(name) > 35:
60 return False, "Name must be 35 characters or fewer (Slack limit)"
61 invalid_chars = set("<>&\"&#x27;`")
62 found = [c for c in name if c in invalid_chars]
63 if found:
64 return False, f"Name contains invalid characters: {' '.join(found)}"
65 return True, ""
66
67
68def make_bot_display_name(name: str) -> str:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected