当前位置:网站首页>Can't you see the withdrawal? Three steps to prevent withdrawal on wechat.
Can't you see the withdrawal? Three steps to prevent withdrawal on wechat.
2022-07-26 15:35:00 【Execution context】
Premise
Yesterday in the group , I saw that my friend sent a ” Indescribable “ Pictures of the , I was just about to open it , Found TA Withdrawn , Damn the withdrawal . See how I deal with you .
preparation
- development tool
- A micro signal registered for more than one year
working principle
Anti withdrawal of the project , In fact, the principle is that this wechat is in the same group as the person you are chatting with , It monitors chat records in real time , Message status detected as withdrawn , It's going to come from the records that were saved before the withdrawal , Take out this data , Forward it to , So as to achieve an anti withdrawal effect . Generally speaking, it is to back up your chat records in real time , Then extract the withdrawn one .
matters needing attention
1、 If you want to prevent withdrawal , This wechat must be in the same group as your current wechat .
2、 In short, your robot wechat and Your main wechat has the same group chat , To prevent withdrawal
3、 Single withdrawal is not supported for the time being , Can only be withdrawn against group defense .
Main code
Get the group object you want to detect , If you want to listen to all the objects , You don't need to
Test = bot.groups().search(u'Test')The message that will be withdrawn Forward to a specific group , For further wechat viewing , It can be a single friend or a file transfer assistant
recallNotice = ensure_one(bot.groups().search('recallNotice'))# Text TEXT = 'Text'
# Location MAP = 'Map' 1
# Business card CARD = 'Card' 2
# Share SHARING = 'Sharing' 3
# picture PICTURE = 'Picture' 4
# voice RECORDING = 'Recording' 5
# file ATTACHMENT = 'Attachment' 6
# video VIDEO = 'Video' 7Registration events , News from all groups
@bot.register(Group)Main code
def handleReceiveMsg(msg):
'''
Listen to the message
:param msg:
:param chats:
:return:
'''
ra = msg.raw
mss = msg.bot.messages
le = len(mss)
if ra['Status'] == 4:
# Get message ID
oldmsgid = re.search(re.compile('<msgid>(.*?)</msgid>', re.S),
ra['Content']).group(1)
for i in range(le-1,-1,-1):
if oldmsgid == str(mss[i].id):
name = msg.chat.name // Get group name
username = msg.member.nick_name // Get the name of the person who withdrew the message
if name == None or name == '':
name = msg.chat.nick_name
username = msg.member.nick_name
// According to different message types, recall prompt
if mss[i].type == 'Text':
recallNotice.send(' come from 【'+ name + '】 Of 【' + username
+'】 Recalled a message :'+ mss[i].text)
bot.file_helper.send(' come from 【'+ name + '】 Of 【' + username
+'】 Recalled a message :'+ mss[i].text)
breakEffect display
Pass the test perfectly , See how you can withdraw .
边栏推荐
- 数据中台、BI业务访谈(四)—— 十个问题看本质
- sqlDeveloper工具快速入门
- 【留点代码】将transformer运用到目标检测上来,通过debug了解模型的模型运算流程
- 数商云:引领化工业态数字升级,看摩贝如何快速打通全场景互融互通
- 使用两个栈实现一个队列
- How much help does solid state disk have for game operation
- R语言ggplot2可视化:可视化折线图、使用aes函数中的group参数为不同分组可视化折线图
- Google tries to introduce password strength indicator for chromeos to improve online security
- Practical task scheduling platform (scheduled task)
- FOC电机控制基础
猜你喜欢

【C】 Flexible array
![[static code quality analysis tool] Shanghai daoning brings you sonarource/sonarqube download, trial and tutorial](/img/fe/3baec8f6def4e569842a683fcb9fd1.png)
[static code quality analysis tool] Shanghai daoning brings you sonarource/sonarqube download, trial and tutorial

81.(cesium之家)cesium修改灰色背景(默认蓝色)

Google tries to introduce password strength indicator for chromeos to improve online security

QCF for deep packet inspection paper summary
![[leetcode] 33. Search rotation sort array](/img/da/e29dc6939803642e45f1ed48f664ce.png)
[leetcode] 33. Search rotation sort array

持续集成(二)Jenkins基本使用介绍

北京的大学排名

Cs224w (Figure machine learning) 2021 winter course learning notes 5

HTB-Apocalyst
随机推荐
OSPF综合实验
cs224w(图机器学习)2021冬季课程学习笔记5
Prometheus adds email alarm and enterprise wechat robot alarm
VP视频结构化框架
组件化开发基本规范、localStorage 和 sessionStorage、对象数据转基本值、原型链使用
How to convert planning map into vector data with longitude and latitude geojson
数据中台、BI业务访谈(四)—— 十个问题看本质
Qt最基本的布局,创建window界面
数仓:数仓建设中的数据建模和日志体系
Use of oscilloscope
Chapter 7 supporting CORS in rest services
C# 给Word每一页设置不同文字水印
04 callable and common auxiliary classes
【五分钟Paper】基于参数化动作空间的强化学习
Xiaobai, which securities firm is the best and safest to open an account
No module named ‘win32gui‘
How to search literature on nature?
Detailed explanation of nat/napt address translation (internal and external network communication) technology [Huawei ENSP]
Sqldeveloper tools quick start
[leetcode daily question] - 268. Missing numbers