Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新功能:自定义回复文本采用多个随机回复形式 #91

Closed
eiriksgata opened this issue May 16, 2022 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@eiriksgata
Copy link
Owner

No description provided.

@eiriksgata
Copy link
Owner Author

eiriksgata commented May 17, 2022

兼容旧版自定义文本返回。当json的value值为 array<string>的时候,将会随机返回 数组中的字符串项。
如果value值为 string 的时候,则直接返回该文本。
例如 配置文件 custom-text.json 中的今日人品返回模板。

 {
  "dice.sc.not-found.error": "找不到san属性",
  "dice.jrrp.success": [
    "你的今日人品为:{0}",
    "今日运气:{0}"
  ],
  "dice.bot.off": "已关闭服务"
}

当你需要设置多个回复的时候,可以将其改为 [] 数组形式 类型为 array<string>

@eiriksgata eiriksgata self-assigned this May 17, 2022
@eiriksgata eiriksgata added enhancement New feature or request good first issue Good for newcomers labels May 17, 2022
@eiriksgata eiriksgata added this to the 0.4.4 milestone May 17, 2022
eiriksgata added a commit that referenced this issue May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant