From cfab6607a617c16f84f01cc968f6d07022f33cc5 Mon Sep 17 00:00:00 2001 From: Suica0w0 <1419845904@qq.com> Date: Tue, 18 Jul 2023 19:32:39 +0800 Subject: [PATCH] Update utils.py --- nonebot-plugin-random/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nonebot-plugin-random/utils.py b/nonebot-plugin-random/utils.py index 6e0b10e..caaa04e 100644 --- a/nonebot-plugin-random/utils.py +++ b/nonebot-plugin-random/utils.py @@ -4,7 +4,7 @@ def is_image_file(path:Path) -> bool: return path.suffix in [".gif",".png",".jpg",".jpeg"] def is_record_file(path:Path) -> bool: - return path.suffix in [".mp3",".wav",".ogg"] + return path.suffix in [".mp3",".wav",".ogg",".flac"] def is_video_file(path:Path) -> bool: return path.suffix in [".mp4",".avi",".flv",".wmv",".mov",".mpg",".mpeg"] @@ -21,4 +21,4 @@ def is_file(type:str,path:Path) -> bool: def replace_message(msg:str,path:Path) -> str: return msg.replace("{filename}",path.name) \ - .replace("{filestem}",path.stem) \ No newline at end of file + .replace("{filestem}",path.stem)