Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 27be35d

Browse files
committed
v0.0.8
1 parent ceff1ec commit 27be35d

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

README.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## Features
88
- Easy and fast to use.
99
- Short code.
10-
- Currently has more than 40+ Functions ready to use and Still will continue to add more functions!
10+
- In this version has more than 55+ Functions ready to use and Still will continue to add more functions!
1111

1212
## Instalation
1313

@@ -26,24 +26,59 @@ npm i github:JastinXyz/whatscode.js
2626
```js
2727
const { Client } = require("whatscode.js");
2828

29-
// all Client options in docs!
29+
// all Client options in the docs!
3030
const bot = new Client({
3131
name: "Your bot name",
3232
prefix: "Your bot prefix",
3333
});
3434

35-
// required callback
35+
// required callback (all callbacks available in the docs)
3636
bot.onConnectionUpdate(); // connection update
3737
bot.onCredsUpdate(); // credentials update
3838
bot.onMessage(); // message update
3939

40-
// ping command
40+
// example ping command
4141
bot.command({
4242
name: "ping",
4343
code: `🏓 | $ping ms`
4444
});
4545
```
4646

47+
## Callbacks
48+
[Callbacks](https://whatscode.jstnlt.my.id/references/callbacks) can be used to run events, sort of logging and the like. There are several callbacks that are needed when creating a bot with **whatscode.js**. But there are still some other callbacks that you can use. You can find it in the [Docs](https://whatscode.jstnlt.my.id)!
49+
50+
```js
51+
// here are examples of callbacks for user join and user leave.
52+
// it can be used like Welcomer or Goodbye.
53+
54+
// callback
55+
bot.onUserJoin()
56+
bot.onUserLeave()
57+
58+
// code breakdown is in the docs...
59+
// This command will run when someone joins the group
60+
bot.userJoinCommand({
61+
groupJid: '123@g.us',
62+
code: `hello {user}, welcome to {group}`
63+
})
64+
65+
// This will run when a user leaves the group.
66+
bot.userLeaveCommand({
67+
groupJid: '123@g.us',
68+
code: `goodbye {user} from {group}`
69+
})
70+
```
71+
72+
## Variables
73+
[Variables](https://whatscode.jstnlt.my.id/references/guides/variables) can be used to store data, you can also use this for like system economics, leveling and others.
74+
75+
```js
76+
bot.variables({
77+
name: "value",
78+
name2: "value2"
79+
})
80+
```
81+
4782
## Contributors
4883
<a href="https://github.com/JastinXyz/whatscode.js/graphs/contributors">
4984
<img src="https://contrib.rocks/image?repo=JastinXyz/whatscode.js" />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "whatscode.js",
3-
"version": "0.0.5",
3+
"version": "0.0.8",
44
"description": "whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not needed.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)