当前位置:网站首页>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 .
边栏推荐
- No module named ‘win32gui‘
- [leetcode daily question] - 268. Missing numbers
- Within a week, I developed my own knowledge sharing platform
- # 工欲善其事必先利其器-C语言拓展--嵌入式C语言(十一)
- Jintuo shares listed on the Shanghai Stock Exchange: the market value of 2.6 billion Zhang Dong family business has a strong color
- Familiarize you with the "phone book" of cloud network: DNS
- VS添加作者信息和时间信息的设置
- Continuous integration (II) introduction to the basic use of Jenkins
- The IPO of shengtaier technology was terminated: it was planned to raise 560million yuan, and Qiming and Jifeng capital were shareholders
- sqlDeveloper工具快速入门
猜你喜欢

TI C6000 TMS320C6678 DSP+ Zynq-7045的ZYNQ PS + PL异构多核案例开发手册(1)

C# 给Word每一页设置不同文字水印
![[5 minutes paper] Pointer network](/img/9a/66edc27f08f245447cc6b8867d2383.png)
[5 minutes paper] Pointer network

Yifang biological fell 16% on the first day of listing: the company's market value was 8.8 billion, and Hillhouse and Lilly were shareholders

81. (cesium home) cesium modifies the gray background (default blue)

03 common set security classes under JUC

谷歌尝试为ChromeOS引入密码强度指示器以提升线上安全性

sklearn clustering聚类

OpenGL learning diary 2 - shaders

Practical task scheduling platform (scheduled task)
随机推荐
[5 minutes paper] Pointer network
03 common set security classes under JUC
USB to serial port parameter configuration function
MYSQL 命令大全
工具技能学习(二):前置技能-shell
# 工欲善其事必先利其器-C语言拓展--嵌入式C语言(十一)
Continuous integration (I) brief introduction to basic concepts
Glyphs V3 Font Icon query
R语言使用lm函数构建多元回归模型(Multiple Linear Regression)、并根据模型系数写出回归方程、使用fitted函数计算出模型的拟合的y值(响应值)向量
Within a week, I developed my own knowledge sharing platform
Tool skill learning (I): pre skills -makfile, make,.Mk
带你熟悉云网络的“电话簿”:DNS
Google tries to introduce password strength indicator for chromeos to improve online security
The IPO of shengtaier technology was terminated: it was planned to raise 560million yuan, and Qiming and Jifeng capital were shareholders
81. (cesium home) cesium modifies the gray background (default blue)
工具技能学习(一):前置技能-makfile、make、.mk
使用两个栈实现一个队列
Double the efficiency of dual screen collaboration lingyao x dual screen Pro leads the new trend of dual screen technology
[leetcode daily question] - 268. Missing numbers
Environment regulation system based on Internet of things (esp32-c3+onenet+ wechat applet)