From a56031dba8fd70b36de7c45b02d05b172294f47b Mon Sep 17 00:00:00 2001 From: sudoskys Date: Tue, 24 Oct 2023 11:09:07 +0800 Subject: [PATCH] Update --- llmbot_plugin_sticker/__init__.py | 2 +- llmbot_plugin_sticker/event.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/llmbot_plugin_sticker/__init__.py b/llmbot_plugin_sticker/__init__.py index 5e419a3..59be440 100644 --- a/llmbot_plugin_sticker/__init__.py +++ b/llmbot_plugin_sticker/__init__.py @@ -45,7 +45,7 @@ sticker = Function( name=__plugin_name__, - description=f"(Active)\nReply an emoji-sticker to express assitant attitude, only in {sticker_event.prompt()}", + description=f"(Active)\nReply an emoji-sticker to express assitant attitude", ) sticker.add_property( property_name="emoji", diff --git a/llmbot_plugin_sticker/event.py b/llmbot_plugin_sticker/event.py index 2492c22..20859bf 100644 --- a/llmbot_plugin_sticker/event.py +++ b/llmbot_plugin_sticker/event.py @@ -8,6 +8,7 @@ from typing import Tuple, Union import emoji +from loguru import logger class StickerEvent(object): @@ -32,6 +33,8 @@ def get_sticker_table(self) -> None: if len(emoji.emojize(sticker.stem)) == 1: # 存储 raw _emoji[emoji.demojize(sticker.stem)] = sticker.absolute() + if not _emoji: + logger.error(f"sticker dir is empty {self.sticker_dir}") self.sticker_tale = _emoji def prompt(self):