nonebot-plugin-acgnshow/nonebot_plugin_acgnshow/util.py
2024-07-11 10:26:21 +00:00

6 lines
188 B
Python

from .config import BGIMAGE_PATH
import random
from pathlib import Path
def choose_random_bgimage():
randomfile = random.choice(list(BGIMAGE_PATH.iterdir()))
return str(randomfile)