feat: support plugins

This commit is contained in:
lanvent
2023-03-12 11:53:06 +08:00
parent 9e07703eb1
commit 0fcf0824dc
8 changed files with 220 additions and 50 deletions

7
app.py
View File

@@ -4,14 +4,17 @@ import config
from channel import channel_factory
from common.log import logger
from plugins import *
if __name__ == '__main__':
try:
# load config
config.load_config()
# create channel
channel = channel_factory.create_channel("wx")
channel_name='wx'
channel = channel_factory.create_channel(channel_name)
if channel_name=='wx':
PluginManager().load_plugins()
# startup channel
channel.startup()