Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smart-chatbot

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smart-chatbot - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

10

main.js

@@ -23,2 +23,3 @@ const axios = require("axios");

if(!mainjson.ownername || typeof mainjson.secretkey !== "string") return console.error("[" + packagename + "] Owner Name Problem");
if(mainjson.gender && (mainjson.gender != "male" && mainjson.gender != "female")) return console.error("[" + packagename + "] Gender Problem");

@@ -29,3 +30,10 @@ if(!json.message || typeof json.message !== "string") reject("No message was provided");

axios.get(`${baseURL}/chatbot?message=${encodeURIComponent(json.message)}&user=${encodeURIComponent(json.user)}&language=${encodeURIComponent(json.language)}&botname=${encodeURIComponent(mainjson.botname)}&ownername=${encodeURIComponent(mainjson.ownername)}`, {
var urlcreate = `${baseURL}/chatbot?message=${encodeURIComponent(json.message)}&user=${encodeURIComponent(json.user)}&language=${encodeURIComponent(json.language)}&botname=${encodeURIComponent(mainjson.botname)}&ownername=${encodeURIComponent(mainjson.ownername)}`;
if(mainjson.gender) urlcreate += `&gender=${encodeURIComponent(mainjson.gender)}`;
if(mainjson.birth) urlcreate += `&birth=${encodeURIComponent(mainjson.birth)}`;
if(mainjson.location) urlcreate += `&location=${encodeURIComponent(mainjson.location)}`;
if(mainjson.email) urlcreate += `&email=${encodeURIComponent(mainjson.email)}`;
axios.get(urlcreate, {
headers: {

@@ -32,0 +40,0 @@ 'Authorization': `${mainjson.secretkey}`,

2

package.json
{
"name": "smart-chatbot",
"version": "1.3.0",
"version": "1.4.0",
"description": "Intelligent Chat Bot Api",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -10,3 +10,11 @@ <p align="center"><a href="https://nodei.co/npm/smart-chatbot"><img src="https://nodei.co/npm/smart-chatbot.png"></a></p>

const chatbot = require("smart-chatbot");
const chatclient = new chatbot.Client({ secretkey: "SECRET KEY", botname: "BOT NAME", ownername: "OWNER NAME" });
const chatclient = new chatbot.Client({
secretkey: "SECRET KEY",
botname: "BOT NAME",
ownername: "OWNER NAME",
gender: "female", // (female/male)
birth: "https://csycraft.com",
location: "https://csybot.csycraft.com",
email: "brain@csycraft.com"
});

@@ -26,3 +34,11 @@ chatclient.chat({

const chatbot = require("smart-chatbot")
const chatclient = new chatbot.Client({ secretkey: "SECRET KEY", botname: "BOT NAME", ownername: "OWNER NAME" });
const chatclient = new chatbot.Client({
secretkey: "SECRET KEY",
botname: "BOT NAME",
ownername: "OWNER NAME",
gender: "female", // (female/male)
birth: "https://csycraft.com",
location: "https://csybot.csycraft.com",
email: "brain@csycraft.com"
});
let question = message.content.split(" ").slice(1).join(" ");

@@ -29,0 +45,0 @@ if(!question || String(question) == String([])) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc