-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
我想监听群聊中其他人进入群聊的事件,是否有提供呢 #2700
Comments
嘿,@aqpmzngldh!真高兴再次遇到你。👋😄 让我来看看你的问题,很快就会回复你的! |
注意不是加入群聊,是进入群聊 |
要监听群聊中其他人进入群聊的事件,可以使用Wechaty的 const { Wechaty } = require('wechaty')
const bot = new Wechaty()
bot.on('start', async () => {
console.log('Bot started.')
})
bot.on('room-join', (room, inviteeList, inviter, date) => {
const nameList = inviteeList.map(c => c.name()).join(',')
console.log(`Room ${room.topic()} got new member ${nameList}, invited by ${inviter.name()} at ${date}`)
})
bot.start() 这段代码会在有新成员加入群聊时触发,打印出新成员的名字、邀请人的名字以及加入的时间。请注意,
|
我说的是进入群聊,而不是加入群聊,就是用户进去群聊这个界面后触发,因为我发现机器本身会触发这的,但是其他人进来后不会进行触发@dosu. |
Wechaty currently does not support an event that triggers specifically when a user enters the chat interface of a group without performing any actions. The available events focus on actions such as joining or leaving a group, sending messages, and other interaction-based activities. Directly detecting when a user opens a chat interface is not a standard feature provided by the WeChat API or Wechaty, as most bot interactions are based on message events or status changes rather than UI actions within the WeChat client. Creating a new event for detecting when a user enters the chat interface would depend on the features supported by the specific Puppet being used with Wechaty and the Wechaty API itself. However, this functionality is not documented as part of Wechaty's current capabilities. While Wechaty supports the integration of third-party libraries or tools to extend its functionalities, there is no specific plugin mentioned in the documentation for detecting when a user enters the chat interface. The framework for creating or integrating such a plugin is supported, but it would require custom development outside of the documented features of Wechaty. If you're looking to extend Wechaty's functionality in this way, you might consider exploring custom solutions or reaching out to the community for suggestions on how to implement this specific feature.
|
我想监听群聊中其他人进入群聊的事件,是否有提供呢
The text was updated successfully, but these errors were encountered: