from itchat import * itchat.auto_login(hotReload=True) type=input(“请输入好友/群聊”) exec(“to_room=itchat.search_%s(name=‘%s’)[0][UserName]”%{‘好友’:’friend’,’群聊’:’chatrooms’}[name],input(“请输入{type}名称”) value=input(“请输入轰炸内容”) for i in range(20): send(value,toUserName=to_friend)