Allow to send message group by group name & some fix

This commit is contained in:
Nur Muhammad
2021-01-22 07:30:50 +08:00
parent 9bea507a05
commit 9b46baa0ac
5 changed files with 44 additions and 15 deletions

View File

@@ -22,17 +22,20 @@ Watch the tutorials:
- Scan the QR Code
- Enjoy!
### Notes
As mentioned in the video above, you have to install `nodemon` to run the start script. You can install nodemon globally with `npm i -g nodemon` command.
### Send message to group
I was added an example to send a message to groups, but before that we must know the group ID (chat ID). Don't worry, I also add the functionality to help you to get that groups ID.
You can send the message to any group by using `chatID` or group `name`, chatID will used if you specify the `id` field in the form, so if you want to send by `name`, only use name.
**Paramaters:**
- `id` (optinal if name given): the chat ID
- `name` (optional): group name
- `message`: the message
Here the endpoint: `/send-group-message`
Here the way to get the groups info (including ID & name):
- Send a message to the API number `!groups`
- The API will replying with the groups info
- Use the ID to send a message
- Here the endpoint: `/send-group-message`