QChatGPT/main.py

20 lines
457 B
Python
Raw Normal View History

2022-12-07 16:48:32 +08:00
import os
import shutil
def main():
# 检查是否有config.py,如果没有就把config-template.py复制一份,并退出程序
if not os.path.exists('config.py'):
shutil.copy('config-template.py', 'config.py')
print('请先在config.py中填写配置')
return
# 导入config.py
assert os.path.exists('config.py')
import config
2022-12-07 22:27:05 +08:00
# print(config.mirai_http_api_config)
2022-12-07 16:48:32 +08:00
if __name__ == '__main__':
2022-12-07 22:27:05 +08:00
main()