mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
feat(bym): 加个表情包开关
This commit is contained in:
parent
077e7e7d59
commit
db3c7b55e9
3 changed files with 20 additions and 7 deletions
|
|
@ -40,7 +40,8 @@ export async function getToimg(e, tag) {
|
|||
logger.warn(`未找到匹配的表情包: ${sanitizedTag}`);
|
||||
return;
|
||||
}
|
||||
const selectedFile = matchedFiles[0];
|
||||
// 随机选择一个文件
|
||||
const selectedFile = matchedFiles[Math.floor(Math.random() * matchedFiles.length)];
|
||||
const picPath = pathModule.join(picturesPath, selectedFile);
|
||||
try {
|
||||
await fs.promises.access(picPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue