mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:15:24 +08:00
🔧 add config for lark users
This commit is contained in:
parent
f63ef8d23b
commit
109cae6dac
@ -136,7 +136,7 @@ class Bot(BaseBot):
|
||||
|
||||
@property
|
||||
def api_root(self) -> str:
|
||||
if self.feishu_config.region == "Lark" :
|
||||
if self.feishu_config.is_lark:
|
||||
return "https://open.larksuite.com/open-apis/"
|
||||
else:
|
||||
return "https://open.feishu.cn/open-apis/"
|
||||
|
@ -14,7 +14,7 @@ class Config(BaseModel):
|
||||
- ``encrypt_key`` / ``feishu_encrypt_key``: 飞书开放平台后台“事件订阅”处设置的 Encrypt Key
|
||||
- ``verification_token`` / ``feishu_verification_token``: 飞书开放平台后台“事件订阅”处设置的 Verification Token
|
||||
- ``tenant_access_token`` / ``feishu_tenant_access_token``: 请求飞书 API 后返回的租户密钥
|
||||
- ``region`` / ``feishu_or_lark``: 选择服务器,如为 ``"Lark"`` 则连接 Lark 服务器
|
||||
- ``is_lark`` / ``feishu_is_lark``: 是否使用Lark(飞书海外版),默认为 false
|
||||
|
||||
"""
|
||||
app_id: Optional[str] = Field(default=None, alias="feishu_app_id")
|
||||
@ -24,7 +24,7 @@ class Config(BaseModel):
|
||||
alias="feishu_verification_token")
|
||||
tenant_access_token: Optional[str] = Field(
|
||||
default=None, alias="feishu_tenant_access_token")
|
||||
region: Optional[str] = Field(default=None, alias="feishu_or_lark")
|
||||
is_lark: Optional[str] = Field(default=False, alias="feishu_is_lark")
|
||||
|
||||
class Config:
|
||||
extra = "ignore"
|
||||
|
Loading…
Reference in New Issue
Block a user