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

Left Nav bar Menu #1139

Merged
merged 32 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bfe33db
added left navigation menu
abhishek-iiit Jul 25, 2021
f37ba3b
0.8.333
abhishek-iiit Jul 25, 2021
89d6724
added padlocal & wechat4u
abhishek-iiit Jul 26, 2021
3811663
0.8.334
abhishek-iiit Jul 26, 2021
67110e8
0.8.335
abhishek-iiit Jul 26, 2021
06eec37
0.8.336
abhishek-iiit Jul 26, 2021
ffcc4e3
renames to listen to events
abhishek-iiit Jul 29, 2021
7c687bf
0.8.337
abhishek-iiit Jul 29, 2021
2c22e11
Merge branch 'master' into nav_bar
abhishek-iiit Aug 23, 2021
a480c01
updated version
abhishek-iiit Aug 23, 2021
33a5b59
Merge branch 'master' of https://github.com/abhishek-iiit/wechaty.js.…
abhishek-iiit Aug 23, 2021
3a8d3ec
renamed file name
abhishek-iiit Aug 23, 2021
2cb5e3e
0.9.3
abhishek-iiit Aug 23, 2021
a179b63
merge conflict
abhishek-iiit Aug 23, 2021
7ab7199
0.9.4
abhishek-iiit Aug 23, 2021
93dbfd6
resolved conflicts
vasvi-sood Oct 17, 2021
6d8295f
Merge branch 'master' of https://github.com/abhishek-iiit/wechaty.js.…
vasvi-sood Oct 17, 2021
b3b8c48
0.10.26
vasvi-sood Oct 17, 2021
fee8cd8
added changes
abhishek-iiit Oct 18, 2021
3537b43
0.10.27
abhishek-iiit Oct 18, 2021
0d11905
test case pass
abhishek-iiit Oct 18, 2021
e5a9eb5
0.10.28
abhishek-iiit Oct 18, 2021
61d56ee
arranged files and resolved conflicts
abhishek-iiit Oct 20, 2021
31b69ff
0.10.29
abhishek-iiit Oct 20, 2021
89c4a44
fixed issue
abhishek-iiit Oct 20, 2021
f9ff9a8
0.10.30
abhishek-iiit Oct 20, 2021
a61fa9e
Merge branch 'main' into nav_bar
abhishek-iiit Nov 17, 2021
decd2db
Merge branch 'main' into nav_bar
shraddhavp Nov 17, 2021
d1ece00
pushing files to fix merging
abhishek-iiit Nov 25, 2021
8cf6787
0.10.46
abhishek-iiit Nov 25, 2021
decbb55
resolved conficts
abhishek-iiit Nov 25, 2021
e35deb5
0.10.47
abhishek-iiit Nov 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,7 @@ To get to know all our writers, see <https://github.com/wechaty/wechaty.js.org/g

## History

### main v1.0 (Nov 22, 2021)

1. Update docs to Wechaty v1.x with `WechatyBuilder`, and other changes to make it more compatible with Wechaty v1.x

### v0.9 (Aug 23, 2021)
### main v0.9 (Aug 23, 2021)

1. Add OpenAPI Specification docs at <https://wechaty.js.org/docs/openapi/> ([#1218](https://github.com/wechaty/wechaty.js.org/issues/1218))

Expand Down
10 changes: 5 additions & 5 deletions docusaurus/docs/api/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ All wechat contacts\(friend\) will be encapsulated as a Contact.
```javascript
import { FileBox } from 'file-box'
import {
WechatyBuilder,
Wechaty,
UrlLink,
MiniProgram,
} from 'wechaty'

const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
const contact = await bot.Contact.find({name: 'lijiarui'}) // change 'lijiarui' to any of your contact name in wechat

Expand Down Expand Up @@ -180,7 +180,7 @@ This method returns the type of the Contact.Check the example below for implemen
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
const isOfficial = contact.type() === bot.Contact.Type.Official
```
Expand Down Expand Up @@ -265,7 +265,7 @@ The method finds the contact by name or alias, if the result more than one, retu
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
const contactFindByName = await bot.Contact.find({ name:"ruirui"} )
const contactFindByAlias = await bot.Contact.find({ alias:"lijiarui"} )
Expand All @@ -287,7 +287,7 @@ This method finds contact by `name` or `alias`.If you use Contact.findAll\(\) g
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
const contactList = await bot.Contact.findAll() // get the contact list of the bot
const contactList = await bot.Contact.findAll({ name: 'ruirui' }) // find all of the contacts whose name is 'ruirui'
Expand Down
8 changes: 4 additions & 4 deletions docusaurus/docs/api/friendship.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The method accepts friend request.Check the example below for implementation
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('friendship', async friendship => {
try {
console.log(`received friend event.`)
Expand Down Expand Up @@ -68,7 +68,7 @@ The method verifies message.Check the example below for implementation.
**Example** _\(If request content is \`ding\`, then accept the friendship\)_

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('friendship', async friendship => {
try {
console.log(`received friend event from ${friendship.contact().name()}`)
Expand All @@ -89,7 +89,7 @@ The method gets the contact from friendship.Below is an example for implementati
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('friendship', friendship => {
const contact = friendship.contact()
const name = contact.name()
Expand All @@ -112,7 +112,7 @@ The method returns the friendship type.Check the below example for implementatio
### Example _\(If request content is \`ding\`, then accept the friendship\)_

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('friendship', async friendship => {
try {
if (friendship.type() === bot.Friendship.Type.Receive && friendship.hello() === 'ding') {
Expand Down
18 changes: 9 additions & 9 deletions docusaurus/docs/api/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ By using message.from, you will receive the sender name from the message. If the
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
const contact = message.from()
Expand All @@ -67,7 +67,7 @@ The method gets the destination of the message Message.to\(\) will return `null`
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
const contact = message.from()
Expand All @@ -90,7 +90,7 @@ By using the `message.room` you get the room from the message.If that particular
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
const contact = message.from()
Expand All @@ -113,7 +113,7 @@ This method returns the text context for the message.
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
const contact = message.from()
Expand All @@ -137,7 +137,7 @@ Here is an example:
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
if (message.type() === bot.Message.Type.Recalled) {
Expand Down Expand Up @@ -166,12 +166,12 @@ By using `message.say` you can reply a Text, Contact Card, Media File or Link me
```javascript
import { FileBox } from 'file-box'
import {
WechatyBuilder,
Wechaty,
UrlLink,
MiniProgram,
} from 'wechaty'

const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {

Expand Down Expand Up @@ -248,7 +248,7 @@ This method gets the type of the wechat message. The different method types supp
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
if (message.type() === bot.Message.Type.Text) {
console.log('This is a text message')
}
Expand Down Expand Up @@ -307,7 +307,7 @@ By using this method you can forward the received message. This action doesn't t
### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async message => {
const room = await bot.Room.find({topic: 'wechaty'})
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/api/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /api/
title: Wechaty API
title: Wechaty API
sidebar_label: 'API: Overview'
---

Expand All @@ -21,5 +21,5 @@ You can import the Wechaty API as shown below:
## ES6/TypeScript

```js
import { WechatyBuilder } from 'wechaty'
import { Wechaty } from 'wechaty'
```
6 changes: 3 additions & 3 deletions docusaurus/docs/api/room-invitation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This method accepts the room invitation. See the following example:
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('room-invite', async roomInvitation => {
try {
console.log(`received room-invite event.`)
Expand All @@ -40,7 +40,7 @@ This method gets the inviter from the room invitation. Check the following examp
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('room-invite', async roomInvitation => {
const inviter = await roomInvitation.inviter()
const name = inviter.name()
Expand All @@ -56,7 +56,7 @@ The method gets the room topic from room invitation as shown in the below exampl
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot.on('room-invite', async roomInvitation => {
const topic = await roomInvitation.topic()
console.log(`received room invitation event from room ${topic}`)
Expand Down
36 changes: 18 additions & 18 deletions docusaurus/docs/api/room.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ The method sends message inside Room, if set mentionList, wechaty will mention t
```javascript
import { FileBox } from 'file-box'
import {
WechatyBuilder,
Wechaty,
UrlLink,
MiniProgram,
} from 'wechaty'

const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'wechaty'})
Expand Down Expand Up @@ -140,7 +140,7 @@ The method returns: `this` - - Room for chain.
#### Example \(Event:join \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'topic of your room'}) // change `event-room` to any room topic in your wechat
Expand All @@ -155,7 +155,7 @@ if (room) {
#### Example \(Event:leave \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'topic of your room'}) // change `event-room` to any room topic in your wechat
Expand All @@ -170,7 +170,7 @@ if (room) {
#### Example \(Event:topic \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'topic of your room'}) // change `event-room` to any room topic in your wechat
Expand All @@ -184,7 +184,7 @@ if (room) {
#### Example \(Event:invite \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'topic of your room'}) // change `event-room` to any room topic in your wechat
Expand All @@ -208,7 +208,7 @@ The method adds contact in a room.Check the below example for implementation.
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const contact = await bot.Contact.find({name: 'lijiarui'}) // change 'lijiarui' to any contact in your wechat
Expand Down Expand Up @@ -237,7 +237,7 @@ The method deletes a contact from the room .It works only when the bot is the ow
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'wechat'}) // change 'wechat' to any room topic in your wechat
Expand Down Expand Up @@ -274,7 +274,7 @@ The method sets or gets topic from the room.Check the below example for implemen
#### Example \(When you say anything in a room, it will get room topic. \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async m => {
const room = m.room()
Expand All @@ -289,7 +289,7 @@ bot
#### Example _\(When you say anything in a room, it will change room topic. \)_

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async m => {
const room = m.room()
Expand Down Expand Up @@ -317,7 +317,7 @@ The methos sets or gets announcement from the room.Check the below example for i
#### Example \(When you say anything in a room, it will get room announce. \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'your room'})
Expand All @@ -328,7 +328,7 @@ console.log(`room announce is : ${announce}`)
#### Example \(When you say anything in a room, it will change room announce. \)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'your room'})
Expand All @@ -354,7 +354,7 @@ The method gets the contact's roomAlias in the room.It returns `Promise <string
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
bot
.on('message', async m => {
const room = m.room()
Expand All @@ -378,7 +378,7 @@ Check if the room has member `contact`, the return is a Promise and must be `awa
#### Example _\(Check whether 'lijiarui' is in the room 'wechaty'\)_

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const contact = await bot.Contact.find({name: 'lijiarui'}) // change 'lijiarui' to any of contact in your wechat
Expand Down Expand Up @@ -429,7 +429,7 @@ This method finds all contacts in a room, if it gets many, then first one is ret
#### Example \(Find member by name\)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'wechaty'}) // change 'wechaty' to any room name in your wechat
Expand All @@ -446,7 +446,7 @@ if (room) {
#### Example \(Find member by MemberQueryFilter\)

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const room = await bot.Room.find({topic: 'wechaty'}) // change 'wechaty' to any room name in your wechat
Expand Down Expand Up @@ -519,7 +519,7 @@ The method finds the room by by filter: {topic: string \| RegExp}, and returns
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in
const roomList = await bot.Room.findAll() // get the room list of the bot
Expand All @@ -537,7 +537,7 @@ Try to find a room by filter: {topic: string \| RegExp}. The method returns `Pro
#### Example

```javascript
const bot = WechatyBuilder.build()
const bot = new Wechaty()
await bot.start()
// after logged in...
const roomList = await bot.Room.find()
Expand Down
Loading