Open ellipsis-dev[bot] opened 6 months ago
[!IMPORTANT]
Auto Review Skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
:warning: Sorry, I timed out before I could complete this PR, so I've submitted my work in progress.
Summary:
Issue: resolves https://github.com/wechaty/getting-started/issues/309
Implementation:
Step 1: Add command handling for the ice-breaking game
Add code to handle the '/☕️' command in the group chat. This code should be added in the file where commands are handled. If the command is sent in the group with the topic 'The Big Community', the game should be triggered. The person who sent the command should be set as the initiator of the game. If the command is sent in a group with less than 3 members, a message should be sent to the group informing them that the game can't be started because there are not enough members.
Step 2: Modify group creation code to select random members
Modify the 'createDingRoom' function in the file '/examples/advanced/room-bot.js' to select two random members from the group instead of adding specific contacts. Use a random number generator to select the members and check that the same member is not selected twice. Set the topic of the new group to 'Coffee Chat' and the initiator of the game as the person who sent the command. Add a check to ensure that the group has at least 3 members before starting the game.
Step 3: Add a welcome message to the new group
Use the
say()
method of the room object to send a welcome message to the new group. The message should be formatted as 'Welcome to the coffee chat group! This group is requested by ${INITIATOR_NAME}, and your random partners are ${GAMERS_NAME}. I hope you guys have a good ice-breaking time!'. Replace ${INITIATOR_NAME} with the name of the initiator and ${GAMERS_NAME} with the names of the gamers.Step 4: Add code to dismiss the group if there are less than 3 people in it
Add code to check the number of members in the group and dismiss the group if there are less than 3 people in it. This code should be added in the file where the group chat functionality is handled. Use the methods for removing members from a room to dismiss the group.
Add command handling for the ice-breaking game
Implemented the feature request to create an ice-breaking game in a group chat. Added command handling for the '/☕️' command, modified the group creation code to select random members, added a welcome message to the new group, and added code to dismiss the group if there are less than 3 people in it.Modify group creation code to select random members
No resultAdd a welcome message to the new group
No resultAdd code to dismiss the group if there are less than 3 people in it
No resultSomething look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #309. Then, try again. For more information, check the documentation.