Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Oct 24, 2023
1 parent 9a73f84 commit a56031d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion llmbot_plugin_sticker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions llmbot_plugin_sticker/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Tuple, Union

import emoji
from loguru import logger


class StickerEvent(object):
Expand All @@ -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):
Expand Down

0 comments on commit a56031d

Please sign in to comment.