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

wickrio-bot-api

Package Overview
Dependencies
Maintainers
2
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wickrio-bot-api - npm Package Compare versions

Comparing version 1.2.0 to 5.38.10

4

package.json
{
"name": "wickrio-bot-api",
"version": "1.2.0",
"version": "5.38.10",
"description": "The official Wickr IO Bot API Framework",

@@ -9,3 +9,3 @@ "main": "WickrIOBot.js",

"simple-encryptor": "^3.0.0",
"wickrio_addon": "^5.30.5"
"wickrio_addon": "^5.38.10"
},

@@ -12,0 +12,0 @@ "scripts": {

@@ -16,32 +16,47 @@ const WickrIOAPI = require('wickrio_addon');

try {
var ref = this;
console.log('Starting bot up...');
return new Promise(function(resolve, reject) {
var status = WickrIOAPI.clientInit(client_username);
console.log(status);
resolve(status);
}).then(function(status) {
var ref = this;
console.log('Starting bot up...');
return new Promise(function(resolve, reject) {
var connected = WickrIOAPI.isConnected(10);
console.log('isConnected:', connected)
resolve(connected);
}).then(async function(connected) {
var settings = JSON.parse(fs.readFileSync('package.json'));
//Check if bot supports a user database
if (!settings.database) {
return true;
}
if (connected) {
var encrypted = await ref.encryptEnv();
var loaded = await ref.loadData();
return true;
} else {
return false;
}
var status = WickrIOAPI.clientInit(client_username);
console.log(status);
resolve(status);
}).then(function(status) {
return new Promise(async function(resolve, reject) {
console.log('Checking for client connectionn...');
var connected = false;
do {
connected = WickrIOAPI.isConnected(10);
console.log('isConnected:', connected);
} while (connected != true);
console.log('isConnected: finally we are connected');
var cState;
do {
cState = WickrIOAPI.getClientState();
console.log('isConnected: client state is', cState);
if (cState != "RUNNING")
await sleep(5000);
} while (cState != "RUNNING");
resolve(connected);
}).then(async function(connected) {
var settings = JSON.parse(fs.readFileSync('package.json'));
//Check if bot supports a user database
if (!settings.database) {
return true;
}
if (connected) {
var encrypted = await ref.encryptEnv();
var loaded = await ref.loadData();
return true;
} else {
return false;
}
}).catch(error => {
console.log(error);
});
}).catch(error => {
console.log(error);
console.log(error);
});
}).catch(error => {
console.log(error);
});
} catch (err) {

@@ -275,2 +290,6 @@ console.log(err);

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
module.exports = {

@@ -277,0 +296,0 @@ WickrIOBot,

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