Files
DanDingNoneBot/danding_bot/plugins/danding_api/config.py
Mr.Xia f61465a95b fix(danding_api): 安全修复+性能改进
- config.py: 硬编码Token/EMAIL_PASSWORD→环境变量
- utils.py: requests→aiohttp异步IO
- utils.py: 移除硬编码用户ID
- utils.py: 可变默认参数dict()→None
- utils.py: 全局session_id封装为函数
- utils.py: tab→4空格统一缩进
2026-05-09 23:52:10 +08:00

30 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
from pydantic import BaseModel
class Config(BaseModel):
"""Plugin Config Here"""
HelpStr:str = """
这是一个蛋定助手的RoBot控制插件功能菜单
在线人数 : 查询当前蛋定助手在线用户数量;
添加卡密 [天|周|月] [指定卡密]: 添加一张指定天数的指定卡密;
生成卡密 [天|周|月]: 生成一张指定天数的卡密;
用户加时 [用户名] [天|周|月] : 添加指定用户时长;
绑定QQ: 为当前QQ号生成绑定验证码
查看日志: 查看当前QQ号绑定日志
"""
Token:str = "" # 从环境变量 DANDING_API_TOKEN 读取
"""对接服务器的Token"""
DDApi_Host:str = "https://api.danding.vip/DD/" # https://api.danding.vip/DD/ http://192.168.5.11:8002/DD/
"""蛋定服务器连接地址 必须指向DD路由开发环境"""
# 邮件设置
EMAIL_API: str = "https://pmail.danding.vip/api/email/send"
EMAIL_LOGIN: str = "https://pmail.danding.vip/api/login"
EMAIL_USER: str = "admin"
EMAIL_FROM: str = "admin@danding.vip"
EMAIL_PASSWORD: str = "" # 从环境变量 DANDING_EMAIL_PASSWORD 读取