mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-31 01:59:58 +00:00
Improve structure
This commit is contained in:
16
none_demo/run.py
Normal file
16
none_demo/run.py
Normal file
@ -0,0 +1,16 @@
|
||||
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