Skip to content
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

[How to guides] Dealing with messages #980

Merged
merged 33 commits into from
Mar 30, 2022

Conversation

vasvi-sood
Copy link
Contributor

@vasvi-sood vasvi-sood commented Jun 25, 2021

messages1
messages2
messages3

@vasvi-sood vasvi-sood added the how to guide PR related to How-to-Guide section label Jun 25, 2021
@vasvi-sood vasvi-sood requested a review from a team as a code owner June 25, 2021 20:43
Copy link
Contributor

@proudofsimin proudofsimin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beside the comments below, I was expected to see instructions/ steps instead of only code snippets without any explanation.

## Mention

Only a message in the room can mention(@) others.
Mention messages are sent automatically by the bot if the message recieved as a parameter by the onMessage belongs to a room. The bot can mention(@) others.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rewrite this sentence? There are so many conjunctions inside and should better be divided. It's a bit difficult to read.
Please note:

  • Put the purpose or condition clauses at the beginning.
  • onMessage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will do the necessary changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, Kindly review it now

## Self message

Self messages are sent automatically by the bot if the message recieved as a parameter by the onMessage function has also been sent by the bot itself.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. Please rewrite this sentence.

@abhishek-iiit abhishek-iiit linked an issue Jun 27, 2021 that may be closed by this pull request
21 tasks
@vasvi-sood
Copy link
Contributor Author

Beside the comments below, I was expected to see instructions/ steps instead of only code snippets without any explanation.

Do you want me to write the prerequisites (installing dependencies, creating a bot.js file)? Basically this code snippet is just a simple function that gives me the following result:
dealingMessage2

@proudofsimin
Copy link
Contributor

Beside the comments below, I was expected to see instructions/ steps instead of only code snippets without any explanation.

Do you want me to write the prerequisites (installing dependencies, creating a bot.js file)? Basically this code snippet is just a simple function that gives me the following result:
dealingMessage2

You could either do like how tutorial team does (#985) or like JavaScript. Basically I would suggest you to add some sentences to explain the code snippets. Please let me know how you think is better? Thank you.

@vasvi-sood
Copy link
Contributor Author

Beside the comments below, I was expected to see instructions/ steps instead of only code snippets without any explanation.

Do you want me to write the prerequisites (installing dependencies, creating a bot.js file)? Basically this code snippet is just a simple function that gives me the following result:
dealingMessage2

You could either do like how tutorial team does (#985) or like JavaScript. Basically I would suggest you to add some sentences to explain the code snippets. Please let me know how you think is better? Thank you.

I think following the pattern that the tutorials team is following will be more intuitive. I wll do it that way.

@proudofsimin
Copy link
Contributor

Beside the comments below, I was expected to see instructions/ steps instead of only code snippets without any explanation.

Do you want me to write the prerequisites (installing dependencies, creating a bot.js file)? Basically this code snippet is just a simple function that gives me the following result:
dealingMessage2

You could either do like how tutorial team does (#985) or like JavaScript. Basically I would suggest you to add some sentences to explain the code snippets. Please let me know how you think is better? Thank you.

I think following the pattern that the tutorials team is following will be more intuitive. I wll do it that way.

or you could see how @abhishek-iiit did, he figured out quite a good way. #981

Copy link
Contributor

@proudofsimin proudofsimin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure did you make any change?
Maybe you could explain what the routines are or where we could find the explanation(ex. .mentionList()).

Copy link
Contributor

@Rohitesh-Kumar-Jain Rohitesh-Kumar-Jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the spelling of Received at all places.

@vasvi-sood
Copy link
Contributor Author

I'm not sure did you make any change?
Maybe you could explain what the routines are or where we could find the explanation(ex. .mentionList()).

I have not made all the required changes. I'll do that soon.

@vasvi-sood
Copy link
Contributor Author

@proudofsimin and @Rohitesh-Kumar-Jain I have made all the necessary changes. Kindly review the same.

Copy link
Member

@abhishek-iiit abhishek-iiit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes as suggest in #1011, else LGTM :)

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements.

Please follow my reviews.

@@ -180,14 +202,17 @@ bot.on('message', onMessage)
```js
const { Message } = require('wechaty')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { Message } from 'wechaty'

docusaurus/docs/howto/message.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Rohitesh-Kumar-Jain Rohitesh-Kumar-Jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing the suggested changes : )

@lijiarui
Copy link
Member

Hi @vasvi-sood Please resolve the conflict first.

@vasvi-sood vasvi-sood enabled auto-merge October 2, 2021 07:47
@vasvi-sood
Copy link
Contributor Author

Hi @vasvi-sood Please resolve the conflict first.

done

@Rohitesh-Kumar-Jain
Copy link
Contributor

ping @huan and @lijiarui

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

docusaurus/docs/howto/message.md Outdated Show resolved Hide resolved
docusaurus/docs/howto/message.md Outdated Show resolved Hide resolved
docusaurus/docs/howto/message.md Outdated Show resolved Hide resolved
docusaurus/docs/howto/message.md Show resolved Hide resolved
@Rohitesh-Kumar-Jain
Copy link
Contributor

@abhishek-iiit pls resolve conflicts first :)

@shraddhavp shraddhavp self-requested a review November 14, 2021 03:58
Copy link
Contributor

@shraddhavp shraddhavp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shraddhavp shraddhavp disabled auto-merge November 17, 2021 03:39
@shraddhavp
Copy link
Contributor

@lijiarui

@huan
Copy link
Member

huan commented Mar 30, 2022

@lijiarui You have blocked this PR for months. I'll merge it in favor of

@huan huan enabled auto-merge (squash) March 30, 2022 12:09
@huan huan disabled auto-merge March 30, 2022 12:09
@huan huan merged commit 1cb5b08 into wechaty:main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoD 2021 how to guide PR related to How-to-Guide section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update and enhance how-to-guide section
7 participants