12 lines
345 B
Python
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() |