whatscode.mongo
v1.0.0
Published
Custom MongoDb database support for whatscode.js
Downloads
1
Maintainers
Readme
whatscode.mongo
Custom MongoDb database support for whatscode.js.
Uh? you don't know what whatscode.js is? whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not really needed...
⚠️ To use a custom database in whatscode.js you need the version of whatscode.js installed from github. Because for now in the npm version, whatscode.js doesn't support custom databases yet (custom databases will be added in the next version of npm)
npm i github:JastinXyz/whatscode.js
Instalation
npm i whatscode.mongo
Setup
It's simple, you just need to add customDatabase
option in whatscode.js client. Make sure you have defined whatscode.mongo correctly. Look at the example below.
const { Client } = require("whatscode.js");
const WhatscodeMongo = require('whatscode.mongo')
const mongo = new WhatscodeMongo("Your MongoDb URL")
const bot = new Client({
name: "Your bot name",
prefix: "Your bot prefix",
customDatabase: mongo
});
// ...
All done, you can use whatscode.js as usual. And the variables you created will be saved to MongoDb.