Coder Social home page Coder Social logo

jastinxyz / whatscode.js Goto Github PK

View Code? Open in Web Editor NEW
35.0 1.0 13.0 2.44 MB

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

Home Page: https://whatscode.jstnlt.my.id

License: MIT License

JavaScript 100.00%
baileys baileys-bot baileys-md bot bots md whatsapp whatsapp-api whatsapp-bot whatsapp-web

whatscode.js's Introduction

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 110 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 callbacks (all callbacks available in the docs)
bot.onConnectionUpdate();
bot.onCredsUpdate();
bot.onMessage();

// 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.

// callbacks
bot.onUserJoin()
bot.onUserLeave()

// code breakdown is in the docs...
// This command will run when someone joins the group
bot.userJoinCommand({
  groupJid: '[email protected]',
  code: `hello {user}, welcome to {group}`
})

// This will run when a user leaves the group.
bot.userLeaveCommand({
  groupJid: '[email protected]',
  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"
})

Advanced

  • Buttons - Add a button to the message. (text required)

    $button[buttonId:button text;...]
    
  • Sticker - Send a sticker.

    $sendSticker[image path;pack name;author name]
    
  • Template Buttons - This function is useful for buttons that have an action such as going to a regular url, call, or quick reply. (text required)

    $templateButtons[(url/call/quickReply):display Text:value;...]
    
  • Sections - Messages with sections are messages that contain a list in them. Like buttons and the like but this is a list. (text required)

    $addSectionsRows[title;rowTitle:rowId:rowDescription]
    $addSectionsDisplayText[some text]
    $addSections[title]
    
  • Command React - Will add a reaction to the command message.

    $commandReact[๐Ÿคจ๏ธ]
    
  • AND MANY MORE

Contributors

Links

whatscode.js's People

Contributors

ferdiz-afk avatar jastinxyz avatar justclizz avatar thisme124 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.