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

21 lines
526 B
Python
Raw Normal View History

2021-01-17 13:46:29 +08:00
from typing import Optional
from pydantic import Field, BaseModel
class Config(BaseModel):
2021-02-05 13:31:33 +08:00
"""
钉钉配置类
:配置项:
- ``access_token`` / ``ding_access_token``: 钉钉令牌
- ``secret`` / ``ding_secret``: 钉钉 HTTP 上报数据签名口令
"""
2021-01-17 13:46:29 +08:00
secret: Optional[str] = Field(default=None, alias="ding_secret")
access_token: Optional[str] = Field(default=None, alias="ding_access_token")
class Config:
extra = "ignore"
allow_population_by_field_name = True