fix:偷表情包配置生效

This commit is contained in:
SengokuCola
2025-06-02 22:23:11 +08:00
parent dd4a327b18
commit 78f6476ebd
4 changed files with 33 additions and 44 deletions

View File

@@ -602,9 +602,9 @@ class EmojiManager:
continue
# 检查是否需要处理表情包(数量超过最大值或不足)
if (self.emoji_num > self.emoji_num_max and global_config.emoji.do_replace) or (
if global_config.emoji.steal_emoji and ((self.emoji_num > self.emoji_num_max and global_config.emoji.do_replace) or (
self.emoji_num < self.emoji_num_max
):
)):
try:
# 获取目录下所有图片文件
files_to_process = [

View File

@@ -202,7 +202,7 @@ class ImageManager:
logger.debug(f"描述是{description}")
# 根据配置决定是否保存图片
if global_config.emoji.save_pic:
# 生成文件名和路径
current_timestamp = time.time()
filename = f"{int(current_timestamp)}_{image_hash[:8]}.{image_format}"

View File

@@ -205,15 +205,6 @@ class EmojiConfig(ConfigBase):
check_interval: int = 120
"""表情包检查间隔(分钟)"""
save_pic: bool = True
"""是否保存图片"""
save_emoji: bool = True
"""是否保存表情包"""
cache_emoji: bool = True
"""是否缓存表情包"""
steal_emoji: bool = True
"""是否偷取表情包,让麦麦可以发送她保存的这些表情包"""

View File

@@ -1,5 +1,5 @@
[inner]
version = "2.9.1"
version = "2.10.0"
#----以下是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读----
#如果你想要修改配置文件请在修改后将version的值进行变更
@@ -114,9 +114,7 @@ working_memory_processor = false # 是否启用工作记忆处理器,不稳定
max_reg_num = 40 # 表情包最大注册数量
do_replace = true # 开启则在达到最大数量时删除(替换)表情包,关闭则达到最大数量时不会继续收集表情包
check_interval = 120 # 检查表情包(注册,破损,删除)的时间间隔(分钟)
save_pic = true # 是否保存图片
cache_emoji = true # 是否缓存表情包
steal_emoji = true # 是否偷取表情包,让麦麦可以发送她保存的这些表情包
steal_emoji = true # 是否偷取表情包,让麦麦可以将一些表情包据为己有
content_filtration = false # 是否启用表情包过滤,只有符合该要求的表情包才会被保存
filtration_prompt = "符合公序良俗" # 表情包过滤要求,只有符合该要求的表情包才会被保存