mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-12 23:16:39 +00:00
Change some logic
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
from os import path
|
||||
|
||||
import none
|
||||
from none_demo import config
|
||||
|
||||
bot = none.init(config)
|
||||
app = bot.asgi
|
||||
|
||||
if __name__ == '__main__':
|
||||
none.load_builtin_plugins()
|
||||
none.load_plugins(path.join(path.dirname(__file__), 'plugins'),
|
||||
'none_demo.plugins')
|
||||
none.run(host=config.HOST, port=config.PORT)
|
||||
|
@ -1,6 +1,4 @@
|
||||
from none import (
|
||||
on_natural_language, NLPSession, NLPResult
|
||||
)
|
||||
from none import on_natural_language, NLPSession, NLPResult
|
||||
|
||||
_last_session = None
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
from os import path
|
||||
|
||||
import none
|
||||
from none_demo import config
|
||||
|
||||
bot = none.create_bot(config)
|
||||
|
||||
none.load_builtin_plugins()
|
||||
plugin_dir = path.join(path.dirname(__file__), 'plugins')
|
||||
none.load_plugins(plugin_dir, 'none_demo.plugins')
|
||||
|
||||
app = bot.asgi
|
||||
|
||||
if __name__ == '__main__':
|
||||
bot.run(host=config.HOST, port=config.PORT)
|
Reference in New Issue
Block a user