代码拉取完成,页面将自动刷新
同步操作将从 蔡子辰/QQchatbot 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
#
#
import nonebot
from nonebot.adapters.cqhttp import Bot as CQHTTPBot
from load_dictionary import dictionary_initial
# Custom your logger
#
# from nonebot.log import logger, default_format
# logger.add("error.log",
# rotation="00:00",
# diagnose=False,
# level="ERROR",
# format=default_format)
# You can pass some keyword args config to init function
# 初始化nonebot
nonebot.init()
app = nonebot.get_asgi()
# 以创建一个新进程运行cqhttp,与之对应的,os.system("cqhttp.exe")会阻塞至程序运行结束
# os.popen("cqhttp.exe")
# 连接驱动
driver = nonebot.get_driver()
driver.register_adapter("cqhttp", CQHTTPBot)
#载入词库
dictionary_initial()
# Please DO NOT modify this file unless you know what you are doing!
# As an alternative, you should use command `nb` or modify `pyproject.toml` to load plugins
#初始化插件
nonebot.load_from_toml("pyproject.toml")
# Modify some config / config depends on loaded configs
#
# config = driver.config
# do something...
if __name__ == "__main__":
nonebot.logger.warning("Always use `nb run` to start the bot instead of manually running!")
nonebot.run(app="__mp_main__:app")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。