enh: channel notification

This commit is contained in:
Timothy Jaeryang Baek
2024-12-25 00:53:25 -07:00
parent 0d7d6899b9
commit d701b69e05
5 changed files with 126 additions and 30 deletions

View File

@@ -21,7 +21,7 @@ def post_webhook(url: str, message: str, event_data: dict) -> bool:
elif "https://discord.com/api/webhooks" in url:
payload["content"] = (
message
if len(message) > 2000
if len(message) < 2000
else f"{message[: 2000 - 20]}... (truncated)"
)
# Microsoft Teams Webhooks