Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
fix: Key error
Browse files Browse the repository at this point in the history
  • Loading branch information
luyanci committed Jul 22, 2024
1 parent d10ee27 commit 217b568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def main():
async def on_successful(event):
# 连接成功
logger.info('Connected!')
if config.plugins_cfg['connect']['enable'] is True:
await live.send_danmu(text=config.plugins_cfg["connect"]['message'])
if config.plugins_cfg['connected']['enable'] is True:
await live.send_danmu(text=config.plugins_cfg["connected"]['message'])
logger.debug(event)

@live.LiveDanma.on('GUARD_BUY')
Expand Down Expand Up @@ -110,7 +110,7 @@ async def on_welcome(event):
async def on_gift(event):
# 收到礼物
logger.debug(json.dumps(event,ensure_ascii=False))
if config.plugins_cfg['gift']['enable'] is False:
if config.plugins_cfg['gifts']['enable'] is False:
return
if event['data']['data']['blind_gift'] != None and config.plugins_cfg['blind']['enable'] is True:
await blind.on_blind(event=event)
Expand Down
2 changes: 1 addition & 1 deletion plugins/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_danmaku_on_gift(event:str):
giftname=info['giftName']
name= info['uname']
try:
contents=str(config.plugins_cfg['gift']['message'])
contents=str(config.plugins_cfg['gifts']['message'])
content_name=contents.replace(" {user} ",f"{name}")
contented=content_name.replace(" {gift} ",f"{giftname}")
except:
Expand Down

0 comments on commit 217b568

Please sign in to comment.