forked from Quan666/ELF_RSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
31 lines (26 loc) · 814 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import nonebot
from nonebot.adapters.onebot.v11 import Adapter as OneBotV11Adapter
# 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.init()
app = nonebot.get_asgi()
driver = nonebot.get_driver()
driver.register_adapter(OneBotV11Adapter)
config = driver.config
nonebot.load_plugins("src/plugins")
# Modify some config / config depends on loaded configs
#
# config = nonebot.get_driver().config
# do something...
# https://v2.nonebot.dev/guide/basic-configuration.html
if __name__ == "__main__":
nonebot.run(app="bot:app")