Update emoji_manager.py

This commit is contained in:
雅诺狐
2025-08-17 13:59:09 +08:00
committed by Windpicker-owo
parent 55a25d071a
commit 762cdf327b

View File

@@ -444,7 +444,6 @@ class EmojiManager:
Optional[Tuple[str, str]]: (表情包完整文件路径, 表情包描述)如果没有找到则返回None Optional[Tuple[str, str]]: (表情包完整文件路径, 表情包描述)如果没有找到则返回None
""" """
try: try:
self.()
_time_start = time.time() _time_start = time.time()
# 获取所有表情包 (从内存缓存中获取) # 获取所有表情包 (从内存缓存中获取)
@@ -691,7 +690,6 @@ class EmojiManager:
""" """
try: try:
with get_db_session() as session: with get_db_session() as session:
self.()
if emoji_hash: if emoji_hash:
query = session.execute(select(Emoji).where(Emoji.emoji_hash == emoji_hash)).scalars().all() query = session.execute(select(Emoji).where(Emoji.emoji_hash == emoji_hash)).scalars().all()
@@ -776,7 +774,6 @@ class EmojiManager:
return emoji.description return emoji.description
# 如果内存中没有,从数据库查找 # 如果内存中没有,从数据库查找
self.()
try: try:
with get_db_session() as session: with get_db_session() as session:
emoji_record = session.execute(select(Emoji).where(Emoji.emoji_hash == emoji_hash)).scalar_one_or_none() emoji_record = session.execute(select(Emoji).where(Emoji.emoji_hash == emoji_hash)).scalar_one_or_none()
@@ -803,7 +800,6 @@ class EmojiManager:
bool: 是否成功删除 bool: 是否成功删除
""" """
try: try:
self.()
# 从emoji_objects中查找表情包对象 # 从emoji_objects中查找表情包对象
emoji = await self.get_emoji_from_manager(emoji_hash) emoji = await self.get_emoji_from_manager(emoji_hash)
@@ -843,7 +839,6 @@ class EmojiManager:
bool: 是否成功替换表情包 bool: 是否成功替换表情包
""" """
try: try:
self.()
# 获取所有表情包对象 # 获取所有表情包对象
emoji_objects = self.emoji_objects emoji_objects = self.emoji_objects