New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问如何发送群消息并@全体成员 #2661
Comments
嗨,@ACGNawsl!很高兴再次见到你 😜 在Wechaty中发送群消息并@全体成员,可以通过调用 对于@全体成员,一个可能的方法是获取群里所有成员的 以下是一个基于Wechaty的示例代码,展示了如何发送消息并尝试@群里的所有成员。请注意,这个方法的有效性可能会因为微信的限制而有所不同,且可能需要根据实际情况进行调整: async function mentionAllMembers(room: Room) {
const members = await room.memberList();
const mentionText = members.map(member => `@${member.name()}`).join(' ');
await room.say(`${mentionText} Hello everyone!`, ...members);
} 在这个示例中, 请注意,这个方法的实际效果可能会受到微信限制的影响,特别是在@全体成员方面,可能不会按预期工作。此外,频繁@大量成员可能会被视为滥用行为,导致账号受到限制。因此,在实际应用中应谨慎使用,并考虑到可能的限制和后果。 关于这个问题,我在Wechaty的仓库中找到了一个类似的问题:support @all ,但是这个问题已经被关闭,并且最后更新是在2023年11月23日。这个问题被引用在了另一个问题:Need a room listener for announcement updates,这个问题也是在2023年11月23日最后更新的。 至于Wechaty API是否提供了一个直接@全体成员的方法,根据我在 如果你有更多的信息或者有其他的问题,欢迎继续提问。 Sources
|
未来会有在群内@全体成员的功能吗,这在计划中吗 |
单个@联系人,可以实现吗?我按照say(content,mentinolist)这种形式处理,发现并不能真的@到。知识text中显示有@。 |
请问如何发送群消息并@全体成员
The text was updated successfully, but these errors were encountered: