Files
erleuchtungfiles/utils.py
2026-02-20 22:26:49 +01:00

12 lines
345 B
Python

import datetime
from config import Config
def truncate(text: str, limit: int = Config.EMBED_LIMIT) -> str:
"""Truncates text to ensure it fits in an Embed field."""
if len(text) > limit:
return text[:limit] + "..."
return text
def get_timestamp():
"""Returns the current timestamp."""
return datetime.datetime.now()