Skip to content

Commit

Permalink
与测试版机器人同步文件
Browse files Browse the repository at this point in the history
  • Loading branch information
chiupam committed Oct 28, 2021
1 parent 50a0bea commit 823d547
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
19 changes: 19 additions & 0 deletions jbot/diy/diy.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,22 @@ async def signCollectGift():
except Exception as e:
await jdbot.send_message(chat_id, 'something wrong,I\'m sorry\n' + str(e))
logger.error('something wrong,I\'m sorry\n' + str(e))


async def rush_lzclient():
try:
"""
try 部分则自由发挥即可
"""








except Exception as e:
await jdbot.send_message(chat_id, 'something wrong,I\'m sorry\n' + str(e))
logger.error('something wrong,I\'m sorry\n' + str(e))

7 changes: 6 additions & 1 deletion jbot/diy/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def red(event):
logger.error(f"错误--->{str(e)}")


@client.on(events.NewMessage(chats=myzdjr_chatIds, pattern=r'export\s(jd_zdjr_activity|jd_joinTeam_activity|FAV).*=(".*"|\'.*\')'))
@client.on(events.NewMessage(chats=myzdjr_chatIds, pattern=r'export\s(jd_zdjr_activity|jd_joinTeam_activity|FAV|RUSH_LZCLIENT).*=(".*"|\'.*\')'))
async def activityID(event):
try:
text = event.message.text
Expand All @@ -104,6 +104,8 @@ async def activityID(event):
name = "组队瓜分2"
elif "FAV_SHOP" in text:
name = "关注有礼"
elif "RUSH_LZCLIENT" in text:
name = "转盘抽奖"
else:
return
msg = await jdbot.send_message(chat_id, f'【监控】 监测到`{name}` 环境变量!')
Expand Down Expand Up @@ -155,6 +157,9 @@ async def activityID(event):
elif "FAV_SHOP_ID" in event.message.text:
from ..diy.diy import jd_fav_shop_gift
await jd_fav_shop_gift()
elif "RUSH_LZCLIENT" in event.message.text:
from ..diy.diy import rush_lzclient
await rush_lzclient()
except ImportError:
pass
except Exception as e:
Expand Down

0 comments on commit 823d547

Please sign in to comment.