mirror of
https://github.com/yulinfeng000/blive.git
synced 2025-03-28 13:00:15 +08:00
15 lines
265 B
Python
15 lines
265 B
Python
from blive import BLiver, Events, BLiverCtx, DanMuMsg
|
|
|
|
app = BLiver(510)
|
|
|
|
|
|
@app.handler(Events.DANMU_MSG)
|
|
async def listen(ctx: BLiverCtx):
|
|
danmu = DanMuMsg(ctx.body)
|
|
print(danmu.content())
|
|
print(danmu.sender())
|
|
print(danmu.timestamp())
|
|
|
|
|
|
app.run()
|