Skip to content

whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...

License

Notifications You must be signed in to change notification settings

itshaiheree/whatscode.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
whatscode.js logo

whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...
For further documentation you can visit https://whatscode.jstnlt.my.id


npm Discord

We are also very open to those of you who want to contribute...

Features

  • Easy and fast to use.
  • Short code.
  • In this version has more than 70 Functions ready to use and Still will continue to add more functions!

Instalation

npm install whatscode.js

or install it from Github for more new features, some bug fixes, and mybe theres some bugs too.

npm i github:JastinXyz/whatscode.js

Quick Starts

const { Client } = require("whatscode.js");

// all Client options in the docs!
const bot = new Client({
  name: "Your bot name",
  prefix: "Your bot prefix",
});

// required callback (all callbacks available in the docs)
bot.onConnectionUpdate(); // connection update
bot.onCredsUpdate(); // credentials update
bot.onMessage(); // message update

// example ping command
bot.command({
  name: "ping",
  code: `🏓 | $ping ms`
});

Callbacks

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!

// here are examples of callbacks for user join and user leave.
// it can be used like Welcomer or Goodbye.

// callback
bot.onUserJoin()
bot.onUserLeave()

// code breakdown is in the docs...
// This command will run when someone joins the group
bot.userJoinCommand({
  groupJid: '123@g.us',
  code: `hello {user}, welcome to {group}`
})

// This will run when a user leaves the group.
bot.userLeaveCommand({
  groupJid: '123@g.us',
  code: `goodbye {user} from {group}`
})

Variables

Variables can be used to store data, you can also use this for like system economics, leveling and others.

bot.variables({
  name: "value",
  name2: "value2"
})

Contributors

Links

About

whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%