-
Notifications
You must be signed in to change notification settings - Fork 346
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
Add tutorial for EventLogger plugin #963
Add tutorial for EventLogger plugin #963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
This is great. Please just change the v-ing in steps to present tense. Thank you.
|
||
This will generate a `node_modules` directory containing all the installed dependencies, and a `package-lock.json` file. | ||
|
||
### 4. Writing code for bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write
bot.start() | ||
``` | ||
|
||
### 5. Running the bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run
npm i wechaty-plugin-contrib | ||
``` | ||
|
||
### 2. Integrating the plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integrate
@proudofsimin I have changed the -ing(s) in steps to present tense and fixed the title capitalizations. |
Hi @proudofsimin @Rohitesh-Kumar-Jain in the previous meeting we were confused where to keep the simple bot, so that we can use it to show how to add the plugins. I and @shwetalsoni discussed about this, and we decided to keep the simple bot inside Examples > Basic > Starter Bot. And, we will show how to add the plugins using this bot. The updated Event Logger plugin page looks like this: |
## Adding Event Logger plugin | ||
|
||
For the demonstration of adding this plugin, we will use the **Starter Bot** and show you how to add the `EventLogger` plugin to it. Follow the steps below: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, do you think if it's better if we add a step one telling our user to create a simple bot first? Anyway it is still a step they need to do first.
- Create a starter bot
Follow the instructions in [Starter bot] to create the the foundation.
- Install dependency
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have added step one for telling the users to create a starter bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love your new organization so much. This is so good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls change as I request, thanks!
|
||
### 1. Create a starter bot | ||
|
||
Follow the instructions on the **Starter Bot** page to create the foundation of a Wechaty bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thinks we should add link for **Starter Bot*
page and then users can refer that part if he don't know how to build a starter bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll add the link. Currently, the Starter Bot page isn't there on the docs, we have it further down on our proposal timeline. Once, the page is ready we will also update the link here.
|
||
In order to run the bot, first you have to **export/set** an environment variable with the type of puppet to use, and then start the bot: | ||
|
||
#### Linux/macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should unify the style here, @shwetalsoni did a good job, it looks like this:
You can use code like this:
<Tabs
groupId="operating-systems"
defaultValue="linux"
values={[
{ label: 'Linux', value: 'linux', },
{ label: 'macOS', value: 'mac', },
{ label: 'Windows', value: 'windows', },
]
}>
<TabItem value="linux">
Learn how to integrate [QR Code Terminal Plugin](./qr-code-terminal) to your Wechaty bot in the next tutorial. | ||
|
||
## References | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add video link reference here: https://www.youtube.com/watch?v=tfGZXoe_aA4
ping @sbis04 |
@sbis04 Pls resolve the conflict, then I will approve this PR. |
@lijiarui Have made the CI green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sbis04 Since the @huan has just added a new unit test for enforcing the image format: the CI will not be passed if we are using other image formats than the perfect .webp. Please make CI green to adjust the new rule, see https://github.com/wechaty/wechaty.js.org/issues/1035 |
@lijiarui I have converted the image to |
I have added the tutorial for the
EventLogger
plugin. The page contents are as follows:Tag #891