nonebot2/packages/nonebot-adapter-cqhttp/nonebot/adapters/cqhttp/config.py

22 lines
569 B
Python
Raw Normal View History

from typing import Optional
2021-01-17 13:46:29 +08:00
from pydantic import Field, BaseModel
2021-01-17 13:46:29 +08:00
# priority: alias > origin
class Config(BaseModel):
2021-02-05 13:31:33 +08:00
"""
CQHTTP 配置类
:配置项:
- ``access_token`` / ``cqhttp_access_token``: CQHTTP 协议授权令牌
- ``secret`` / ``cqhttp_secret``: CQHTTP HTTP 上报数据签名口令
"""
2021-01-17 13:46:29 +08:00
access_token: Optional[str] = Field(default=None,
alias="cqhttp_access_token")
secret: Optional[str] = Field(default=None, alias="cqhttp_secret")
class Config:
extra = "ignore"