diff --git a/.env.example b/.env.example deleted file mode 100644 index 3add97c..0000000 --- a/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -WWEBJS_TEST_REMOTE_ID=XXXXXXXXXX@c.us -WWEBJS_TEST_CLIENT_ID=authenticated -WWEBJS_TEST_MD=1 \ No newline at end of file diff --git a/README.md b/README.md index d97f389..bacbd17 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,39 @@ [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#table-of-contents) # MYWAJS -[COMMUNITY - CLICK HERE](https://chat.whatsapp.com/BIHE3USWr4lAnahwJTQEOX) - [DOCS MYWAJS - CLICK HERE](https://amiruldev20.github.io/mywajs) +[COMMUNITY - CLICK HERE](https://chat.whatsapp.com/BIHE3USWr4lAnahwJTQEOX) - [DOCS MYWAJS - CLICK HERE](https://mywajs.amirull.dev) - > *NB*: this is whatsapp-web.js fork with features added from wajs wpp. permits had been granted by WPP - -

+ > *NB*: this is whatsapp-web.js fork with features from wajs wpp. Previously, permits had been granted by WPP +

+ + [![npm version](https://img.shields.io/npm/v/mywajs.svg?color=green)](https://www.npmjs.com/package/mywajs) ![node](https://img.shields.io/node/v/mywajs) [![Downloads](https://img.shields.io/npm/dm/mywajs.svg)](https://www.npmjs.com/package/mywajs) -[![GitHub contributors](https://img.shields.io/github/contributors/amiruldev20/mywajs.svg)](https://github.com/your-username/your-repo/graphs/contributors) +[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/amiruldev20/mywajs.svg)](http://isitmaintained.com/project/amiruldev20/mywajs "Average time to resolve an issue") +[![Percentage of issues still open](http://isitmaintained.com/badge/open/amiruldev20/mywajs.svg)](http://isitmaintained.com/project/amiruldev20/mywajs "Percentage of issues still open") +

``` -This project is a wwebjs fork with more features imported from WPP, developed using playwright and wajs. -This is an unofficial whatsapp library. -You can get banned for using this library. -Im not responsible if you got banned. -If you need example you can find in on the examples folder +it's the wwebjs library redeveloped using +playwright and wajs. +because in my opinion playwright is lighter. +This is an unofficial library, +doesn't mean it's anti-banned. +use accordingly, don't overspend -Why am I using playwright? -In my opinion playwright is faster than puppeteer +for example check folder example +docs? check folder docs ``` -> [!NOTE] -> If you want to add/fix a feature in this project, feel free to edit this project code and make a new PR - ## Supported features | Feature | Status | | ------------- | ------------- | | Login via phone | ✅ | | Multi Device | ✅ | +| Creae Channel | ✅ | | Join Wa Beta | ✅ | | Change theme | ✅ | | Send polling | ✅ | diff --git a/docs/start.md b/docs/start.md deleted file mode 100644 index 124c1c3..0000000 --- a/docs/start.md +++ /dev/null @@ -1,24 +0,0 @@ -> [!NOTE] -> it's a re-development library of wwebjs tweaked using playwright and wajs. This library is made easier and lighter, if there are additional request please open an issue or discuss on the repo - -don't forget to join the whatsapp community to get the latest information from this lib [Join Community](https://chat.whatsapp.com/BIHE3USWr4lAnahwJTQEOX) - -> [!WARNING] -> MywaJS created using the esm module type (ECMAScript Modules). please add type: 'module' to your package.json. and use import module using import, not require - -### Installing MywaJS -

You can get the module from npm:

- -```bash -npm i mywajs -``` - -> [!IMPORTANT] -> can be run on: -> - vps -> - rdp -> - hosting (gold server) -> - replit - -### Playwright Installation -

after installing nodejs, please install playwr with the npx playwright install-deps command

diff --git a/docs/tes.html b/docs/tes.html deleted file mode 100644 index 6d2a233..0000000 --- a/docs/tes.html +++ /dev/null @@ -1 +0,0 @@ -testing diff --git a/examples/linkingdevice.js b/example/linkingdevice.js similarity index 100% rename from examples/linkingdevice.js rename to example/linkingdevice.js diff --git a/examples/linkingphone.js b/example/linkingphone.js similarity index 100% rename from examples/linkingphone.js rename to example/linkingphone.js diff --git a/index.d.ts b/index.d.ts index 005bdd6..baaf809 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,1717 +7,1752 @@ * ig: amirul.dev */ import { - EventEmitter + EventEmitter } from "events"; import { - AxiosInterceptorOptions + AxiosInterceptorOptions } from "axios"; import * as playwright from "playwright-chromium"; import PollVote from "./src/structures/PollVote.js"; declare namespace WAWebJS { - export class Client extends EventEmitter { - constructor(options: ClientOptions); + export class Client extends EventEmitter { + constructor(options: ClientOptions); - /** Current connection information */ - public info: ClientInfo; + /** Current connection information */ + public info: ClientInfo; - /** playwright page running WhatsApp Web */ - mPage ? : playwright.Page; + /** playwright page running WhatsApp Web */ + mPage?: playwright.Page; - /** playwright browser running WhatsApp Web */ - pupBrowser ? : playwright.Browser; + /** playwright browser running WhatsApp Web */ + pupBrowser?: playwright.Browser; - /**Accepts an invitation to join a group */ - acceptInvite(inviteCode: string): Promise < string > ; + /**Accepts an invitation to join a group */ + acceptInvite(inviteCode: string): Promise; - /**Returns an object with information about the invite code's group */ - getInviteInfo(inviteCode: string): Promise < object > ; + /**Returns an object with information about the invite code's group */ + getInviteInfo(inviteCode: string): Promise; - /** Enables and returns the archive state of the Chat */ - archiveChat(chatId: string): Promise < boolean > ; + /** Enables and returns the archive state of the Chat */ + archiveChat(chatId: string): Promise; - /** Pins the Chat and returns its new Pin state */ - pinChat(chatId: string): Promise < boolean > ; + /** Pins the Chat and returns its new Pin state */ + pinChat(chatId: string): Promise; - /** Unpins the Chat and returns its new Pin state */ - unpinChat(chatId: string): Promise < boolean > ; + /** Unpins the Chat and returns its new Pin state */ + unpinChat(chatId: string): Promise; - /** - * Create a new group - * @param name group title - * @param participants an array of Contacts or contact IDs to add to the group - */ - createGroup( - name: string, - participants: Contact[] | string[] - ): Promise < CreateGroupResult > ; + /** + * Create a new group + * @param name group title + * @param participants an array of Contacts or contact IDs to add to the group + */ + createGroup( + name: string, + participants: Contact[] | string[] + ): Promise; - /** Closes the client */ - destroy(): Promise < void > ; + /** Closes the client */ + destroy(): Promise; - /** Logs out the client, closing the current session */ - logout(): Promise < void > ; + /** Logs out the client, closing the current session */ + logout(): Promise; - /** Get all blocked contacts by host account */ - getBlockedContacts(): Promise < Contact[] > ; + /** Get all blocked contacts by host account */ + getBlockedContacts(): Promise; - /** Get chat instance by ID */ - getChatById(chatId: string): Promise < Chat > ; + /** Get chat instance by ID */ + getChatById(chatId: string): Promise; - /** Get all current chat instances */ - getChats(): Promise < Chat[] > ; + /** Get all current chat instances */ + getChats(): Promise; - /** Get contact instance by ID */ - getContactById(contactId: string): Promise < Contact > ; + /** Get contact instance by ID */ + getContactById(contactId: string): Promise; - /** Get all current contact instances */ - getContacts(): Promise < Contact[] > ; + /** Get all current contact instances */ + getContacts(): Promise; - /** Get the country code of a WhatsApp ID. (154185968@c.us) => (1) */ - getCountryCode(number: string): Promise < string > ; + /** Get the country code of a WhatsApp ID. (154185968@c.us) => (1) */ + getCountryCode(number: string): Promise; - /** Get the formatted number of a WhatsApp ID. (12345678901@c.us) => (+1 (234) 5678-901) */ - getFormattedNumber(number: string): Promise < string > ; + /** Get the formatted number of a WhatsApp ID. (12345678901@c.us) => (+1 (234) 5678-901) */ + getFormattedNumber(number: string): Promise; - /** Get all current Labels */ - getLabels(): Promise < Label[] > ; + /** Get all current Labels */ + getLabels(): Promise; - /** Get Label instance by ID */ - getLabelById(labelId: string): Promise < Label > ; + /** Get Label instance by ID */ + getLabelById(labelId: string): Promise