This commit is contained in:
jbkzi
2026-02-20 22:26:49 +01:00
commit 7ddc49e24a
7 changed files with 145 additions and 0 deletions

12
utils.py Normal file
View File

@@ -0,0 +1,12 @@
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()