首次提交

This commit is contained in:
2025-12-26 22:41:42 +08:00
commit 4a944316fe
143 changed files with 17550 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import os
from typing import Union, Optional
from pathlib import Path
def get_image_path(file_path: str) -> str:
"""获取图片的绝对路径"""
return os.path.abspath(file_path)
def format_user_mention(user_id: str, user_name: Optional[str] = None) -> str:
"""格式化用户@信息"""
display_name = user_name if user_name else f"用户{user_id}"
return f"@{display_name}"