mirror of
https://github.com/yulinfeng000/blive.git
synced 2024-12-26 21:00:35 +08:00
update nothing
This commit is contained in:
parent
101a8ed416
commit
9254a7500e
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) [2020] [yulinfeng]
|
Copyright (c) 2020 LinFeng Yu
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -211,6 +211,7 @@ packman = BWS_MsgPackage()
|
|||||||
|
|
||||||
|
|
||||||
class Events(str, enum.Enum):
|
class Events(str, enum.Enum):
|
||||||
|
LIVE = "LIVE" # 主播开播
|
||||||
PREPARING = "PREPARING" # 下播【结束语】
|
PREPARING = "PREPARING" # 下播【结束语】
|
||||||
ROOM_CHANGE = "ROOM_CHANGE" # 房间信息改变
|
ROOM_CHANGE = "ROOM_CHANGE" # 房间信息改变
|
||||||
ROOM_RANK = "ROOM_RANK" # 排名改变
|
ROOM_RANK = "ROOM_RANK" # 排名改变
|
||||||
|
@ -97,6 +97,9 @@ class BLiver:
|
|||||||
|
|
||||||
return f_wrapper
|
return f_wrapper
|
||||||
|
|
||||||
|
def register_handler(self, event: Union[Events, List[Events]], handler):
|
||||||
|
self.processor.register(event, handler)
|
||||||
|
|
||||||
def scheduled(
|
def scheduled(
|
||||||
self,
|
self,
|
||||||
trigger,
|
trigger,
|
||||||
@ -171,3 +174,7 @@ class BLiver:
|
|||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.create_task(self.listen())
|
loop.create_task(self.listen())
|
||||||
loop.run_forever()
|
loop.run_forever()
|
||||||
|
|
||||||
|
def run_as_task(self):
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
|
return loop.create_task(self.listen())
|
||||||
|
@ -6,7 +6,6 @@ async-timeout==4.0.2
|
|||||||
asynctest==0.13.0
|
asynctest==0.13.0
|
||||||
attrs==21.4.0
|
attrs==21.4.0
|
||||||
backports.zoneinfo==0.2.1
|
backports.zoneinfo==0.2.1
|
||||||
black==21.12b0
|
|
||||||
Brotli==1.0.9
|
Brotli==1.0.9
|
||||||
cchardet==2.1.7
|
cchardet==2.1.7
|
||||||
certifi==2021.10.8
|
certifi==2021.10.8
|
||||||
|
Loading…
Reference in New Issue
Block a user