mirror of
https://github.com/yulinfeng000/blive.git
synced 2024-12-25 20:30:12 +08:00
update readme
This commit is contained in:
parent
758108b346
commit
46b8078bc1
@ -82,8 +82,8 @@ async def main():
|
||||
azi = BLiver(510)
|
||||
|
||||
# 注册handler
|
||||
ke.register_handler(Events.DANMU_MSG, listen)
|
||||
azi.register_handler(Events.DANMU_MSG, listen)
|
||||
ke.on(Events.DANMU_MSG, listen)
|
||||
azi.on(Events.DANMU_MSG, listen)
|
||||
|
||||
# 以异步task的形式运行
|
||||
task1 = ke.run_as_task()
|
||||
@ -132,7 +132,7 @@ async def handler(ctx):
|
||||
|
||||
def create_bliver(roomid):
|
||||
b = BLiver(roomid)
|
||||
b.register_handler(Events.DANMU_MSG,handler)
|
||||
b.on(Events.DANMU_MSG,handler)
|
||||
return b
|
||||
|
||||
|
||||
|
@ -25,11 +25,11 @@ async def main():
|
||||
hai7 = BLiver(21452505)
|
||||
azi = BLiver(510)
|
||||
|
||||
azi.register_handler(Events.DANMU_MSG, listen)
|
||||
azi.register_handler(Events.INTERACT_WORD, listen_join)
|
||||
azi.on(Events.DANMU_MSG, listen)
|
||||
azi.on(Events.INTERACT_WORD, listen_join)
|
||||
# 注册handler
|
||||
hai7.register_handler(Events.DANMU_MSG, listen)
|
||||
hai7.register_handler(Events.INTERACT_WORD, listen_join)
|
||||
hai7.on(Events.DANMU_MSG, listen)
|
||||
hai7.on(Events.INTERACT_WORD, listen_join)
|
||||
|
||||
# 以异步task的形式运行
|
||||
task1 = hai7.run_as_task()
|
||||
|
@ -17,7 +17,7 @@ def create_bliver(roomid):
|
||||
)
|
||||
|
||||
b = BLiver(roomid)
|
||||
b.register_handler(Events.DANMU_MSG, listen)
|
||||
b.on(Events.DANMU_MSG, listen)
|
||||
return b
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user