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

Fix: 重构林汐配置管理 #5

Merged
merged 3 commits into from
Jul 22, 2023
Merged

Fix: 重构林汐配置管理 #5

merged 3 commits into from
Jul 22, 2023

Conversation

KomoriDev
Copy link
Member

新增配置管理器 - ConfigManager

支持 增加配置、设置配置、读取配置

例子

  • 读取 注册奖励
loginAward = ConfigManager.get_config("Award")["login"]

将返回: [20, 10, 0]

  • 读取 签到奖励
signAward = ConfigManager.get_config("Award")["sign"]

将返回: [[30, 60], 5, 10]

配置解析

Award:
  login:        # ---> [20, 10, 0]
    - 20        # 硬币奖励
    - 10        # 好感度奖励
    - 0         # 经验值奖励
  sign:         # ---> [[30, 60], 5, 100]
    - [30, 60]  
    - 5
    - 100

删除多余 telegram_proxy 配置

使用 .env.prod 下的 PROXY 代替,避免重复配置

@netsora netsora deleted a comment from netlify bot Jul 22, 2023
@KomoriDev KomoriDev added the enhancement New feature or request label Jul 22, 2023
@github-actions
Copy link

🚀 Deployed on https://deploy-preview-5--sorabot.netlify.app

@github-actions github-actions bot temporarily deployed to pull request July 22, 2023 03:46 Inactive
@KomoriDev KomoriDev merged commit f941835 into master Jul 22, 2023
@KomoriDev KomoriDev deleted the recycle/config branch July 22, 2023 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant