-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
33 lines (27 loc) · 962 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
32
33
from os import path
import nonebot
import bot_config
nonebot.init(bot_config)
# 第一个参数为插件路径,第二个参数为插件前缀(模块的前缀)
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins'), 'bot_plugins')
# talk内容包
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins/talk'), 'bot_plugins.talk')
# 11th
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins/11th'), 'bot_plugins.11th')
# bor
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins/bor'), 'bot_plugins.bor')
# MARYT
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins/MARYT'), 'bot_plugins.MARYT')
# VANILO
nonebot.plugin.load_plugins(
path.join(path.dirname(__file__), 'bot_plugins/VANILO'), 'bot_plugins.VANILO')
# 如果使用 asgi
bot = nonebot.get_bot()
app = bot.asgi
if __name__ == '__main__':
nonebot.run()