-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
120 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
from typing import Optional, List | ||
|
||
from nonebot import get_driver | ||
from nonebot.plugin import get_plugin_config | ||
from pydantic import BaseModel, Field, AnyUrl | ||
|
||
|
||
class Config(BaseModel): | ||
natfrp_api: AnyUrl = Field(default="https://api.natfrp.com/v4") | ||
natfrp_token: Optional[str] = Field(default=None) | ||
natfrp_at: bool = Field(default=False) | ||
natfrp_reply: bool = Field(default=False) | ||
natfrp_use_start: bool = Field(default=True) | ||
natfrp_use_sep: bool = Field(default=False) | ||
api: AnyUrl = Field(default="https://api.natfrp.com/v4", alias="natfrp_api") | ||
token: Optional[str] = Field(default=None, alias="natfrp_token") | ||
at: bool = Field(default=False, alias="natfrp_at") | ||
reply: bool = Field(default=False, alias="natfrp_reply") | ||
use_start: bool = Field(default=True, alias="natfrp_use_start") | ||
use_sep: bool = Field(default=False, alias="natfrp_use_sep") | ||
|
||
natfrp_cmd_help: List[str] = Field(default=["frp帮助"]) | ||
natfrp_cmd_powerOn: List[str] = Field(default=["开机"]) | ||
natfrp_cmd_tunnels: List[str] = Field(default=["隧道状态"]) | ||
natfrp_cmd_trafficHistory: List[str] = Field(default=["流量", "流量历史"]) | ||
natfrp_cmd_trafficPlans: List[str] = Field(default=["流量包", "流量套餐"]) | ||
natfrp_cmd_userInfo: List[str] = Field(default=["我的信息", "用户信息"]) | ||
natfrp_cmd_announcement: List[str] = Field(default=["公告"]) | ||
natfrp_cmd_auth: List[str] = Field(default=["授权"]) | ||
natfrp_cmd_showPCs: List[str] = Field(default=["计算机列表"]) | ||
cmd_help: List[str] = Field(default=["frp帮助"], alias="natfrp_cmd_help") | ||
cmd_powerOn: List[str] = Field(default=["开机"], alias="natfrp_cmd_powerOn") | ||
cmd_tunnels: List[str] = Field(default=["隧道状态"], alias="natfrp_cmd_tunnels") | ||
cmd_trafficHistory: List[str] = Field(default=["流量", "流量历史"], alias="natfrp_cmd_trafficHistory") | ||
cmd_trafficPlans: List[str] = Field(default=["流量包", "流量套餐"], alias="natfrp_cmd_trafficPlans") | ||
cmd_userInfo: List[str] = Field(default=["我的信息", "用户信息"], alias="natfrp_cmd_userInfo") | ||
cmd_announcement: List[str] = Field(default=["公告"], alias="natfrp_cmd_announcement") | ||
cmd_auth: List[str] = Field(default=["授权"], alias="natfrp_cmd_auth") | ||
cmd_showPCs: List[str] = Field(default=["计算机列表"], alias="natfrp_cmd_showPCs") | ||
|
||
|
||
config: Config = Config(**get_driver().config.dict()) | ||
config: Config = get_plugin_config(Config) | ||
|
||
__all__ = ["Config", "config"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.