Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/core/builtins/utils/__init__.py

35 lines
749 B
Python
Raw Normal View History

2021-10-14 15:29:45 +00:00
import os
from config import Config
if not (confirm_command := Config('confirm_command')):
2023-07-13 04:26:10 +00:00
confirm_command = ["", "", "", "yes", "Yes", "YES", "y", "Y"]
if not (command_prefix := Config('command_prefix')):
command_prefix = ['~', ''] # 消息前缀
2021-08-23 12:44:31 +00:00
2021-10-11 14:45:28 +00:00
class EnableDirtyWordCheck:
status = False
2021-10-14 15:29:45 +00:00
class PrivateAssets:
path = os.path.abspath('.')
2023-06-09 10:39:39 +00:00
@classmethod
def set(cls, path):
2021-10-14 15:29:45 +00:00
path = os.path.abspath(path)
if not os.path.exists(path):
os.mkdir(path)
2023-06-09 10:39:39 +00:00
cls.path = path
2021-10-14 15:29:45 +00:00
2021-12-31 14:44:34 +00:00
class Secret:
list = []
2023-06-09 10:39:39 +00:00
@classmethod
def add(cls, secret):
cls.list.append(secret)
2021-12-31 14:44:34 +00:00
__all__ = ["confirm_command", "command_prefix", "EnableDirtyWordCheck", "PrivateAssets", "Secret"]