mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-23 17:47:27 +00:00
Merge branch 'master' into Coolguy3289-patch-3
This commit is contained in:
commit
fa0a916774
10 changed files with 344 additions and 412 deletions
|
@ -73,9 +73,9 @@ bot.on('error', function(error) {
|
||||||
|
|
||||||
function checkMessageForCommand(msg, isEdit) {
|
function checkMessageForCommand(msg, isEdit) {
|
||||||
//check if message is a command
|
//check if message is a command
|
||||||
if (msg.author.id != bot.user.id && msg.content.startsWith(config.prefix)) {
|
if (msg.author.id !== bot.user.id && msg.content.startsWith(config.prefix)) {
|
||||||
//check if user is Online
|
//check if user is Online
|
||||||
if (!msg.author.presence.status || msg.author.presence.status == 'offline' || msg.author.presence.status == 'invisible') {
|
if (!msg.author.presence.status || msg.author.presence.status === 'offline' || msg.author.presence.status === 'invisible') {
|
||||||
msg.author.send('Please set your Discord Presence to Online to talk to the bot!').catch(function(error) {
|
msg.author.send('Please set your Discord Presence to Online to talk to the bot!').catch(function(error) {
|
||||||
msg.channel
|
msg.channel
|
||||||
.send(
|
.send(
|
||||||
|
@ -185,7 +185,7 @@ function checkMessageForCommand(msg, isEdit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.author != bot.user && msg.isMentioned(bot.user)) {
|
if (msg.author !== bot.user && msg.isMentioned(bot.user)) {
|
||||||
msg.channel.send('yes?'); //using a mention here can lead to looping
|
msg.channel.send('yes?'); //using a mention here can lead to looping
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ let config = require('config');
|
||||||
let channels = config.get('claimbot').channels;
|
let channels = config.get('claimbot').channels;
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
let lastProcessedBlock = 0;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
init: init
|
init: init
|
||||||
|
|
|
@ -14,7 +14,7 @@ exports.price = {
|
||||||
usage: '<currency> <amount>',
|
usage: '<currency> <amount>',
|
||||||
description: 'displays price of lbc',
|
description: 'displays price of lbc',
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
var options = {
|
let options = {
|
||||||
defaultCurrency: 'BTC',
|
defaultCurrency: 'BTC',
|
||||||
|
|
||||||
// supported currencies and api steps to arrive at the final value
|
// supported currencies and api steps to arrive at the final value
|
||||||
|
@ -503,22 +503,22 @@ exports.price = {
|
||||||
// refresh rate in milliseconds to retrieve a new price (default to 10 minutes)
|
// refresh rate in milliseconds to retrieve a new price (default to 10 minutes)
|
||||||
refreshTime: 100000
|
refreshTime: 100000
|
||||||
};
|
};
|
||||||
var words = suffix
|
let words = suffix
|
||||||
.trim()
|
.trim()
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.filter(function(n) {
|
.filter(function(n) {
|
||||||
return n !== '';
|
return n !== '';
|
||||||
});
|
});
|
||||||
|
|
||||||
var currency = words.length > 0 ? words[0].toUpperCase() : options.defaultCurrency;
|
let currency = words.length > 0 ? words[0].toUpperCase() : options.defaultCurrency;
|
||||||
var amount = words.length > 1 ? parseFloat(words[1], 10) : 1;
|
let amount = words.length > 1 ? parseFloat(words[1], 10) : 1;
|
||||||
var showHelp = isNaN(amount) || Object.keys(options.currencies).indexOf(currency) === -1;
|
let showHelp = isNaN(amount) || Object.keys(options.currencies).indexOf(currency) === -1;
|
||||||
// store the last retrieved rate
|
// store the last retrieved rate
|
||||||
var cachedRates = {};
|
let cachedRates = {};
|
||||||
var command = '!price';
|
let command = '!price';
|
||||||
|
|
||||||
var currencies = Object.keys(options.currencies);
|
let currencies = Object.keys(options.currencies);
|
||||||
for (var i = 0; i < currencies.length; i++) {
|
for (let i = 0; i < currencies.length; i++) {
|
||||||
cachedRates[currencies[i]] = {
|
cachedRates[currencies[i]] = {
|
||||||
rate: 0,
|
rate: 0,
|
||||||
time: null
|
time: null
|
||||||
|
@ -539,7 +539,7 @@ exports.price = {
|
||||||
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to price bot.');
|
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to price bot.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var message = `**${command}**: show the price of 1 LBC in ${options.defaultCurrency}
|
let message = `**${command}**: show the price of 1 LBC in ${options.defaultCurrency}
|
||||||
**${command} help**: this message
|
**${command} help**: this message
|
||||||
**${command} CURRENCY**: show the price of 1 LBC in CURRENCY. Supported values for CURRENCY are Listed Below
|
**${command} CURRENCY**: show the price of 1 LBC in CURRENCY. Supported values for CURRENCY are Listed Below
|
||||||
**${command} CURRENCY AMOUNT**: show the price of AMOUNT LBC in CURRENCY
|
**${command} CURRENCY AMOUNT**: show the price of AMOUNT LBC in CURRENCY
|
||||||
|
@ -548,28 +548,28 @@ exports.price = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMessage(amount, rate, option) {
|
function formatMessage(amount, rate, option) {
|
||||||
var cur = option.sign;
|
let cur = option.sign;
|
||||||
var value = numeral(rate.rate * amount).format(option.format);
|
let value = numeral(rate.rate * amount).format(option.format);
|
||||||
return `*${numeral(amount).format('0,0[.][00000000]')} LBC = ${cur} ${value}*
|
return `*${numeral(amount).format('0,0[.][00000000]')} LBC = ${cur} ${value}*
|
||||||
_last updated ${rate.time.utc().format(options.dtFormat)}_`;
|
_last updated ${rate.time.utc().format(options.dtFormat)}_`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSteps(bot, currency, amount) {
|
function doSteps(bot, currency, amount) {
|
||||||
var option = options.currencies[currency];
|
let option = options.currencies[currency];
|
||||||
var shouldReload = true;
|
let shouldReload = true;
|
||||||
if (cachedRates[currency]) {
|
if (cachedRates[currency]) {
|
||||||
var cache = cachedRates[currency];
|
let cache = cachedRates[currency];
|
||||||
shouldReload = cache.time === null || moment().diff(cache.time) >= options.refreshTime;
|
shouldReload = cache.time === null || moment().diff(cache.time) >= options.refreshTime;
|
||||||
if (!shouldReload) {
|
if (!shouldReload) {
|
||||||
var message = formatMessage(amount, cache, option);
|
let message = formatMessage(amount, cache, option);
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldReload) {
|
if (shouldReload) {
|
||||||
// copy the steps array
|
// copy the steps array
|
||||||
var steps = [];
|
let steps = [];
|
||||||
for (var i = 0; i < option.steps.length; i++) {
|
for (let i = 0; i < option.steps.length; i++) {
|
||||||
steps.push(option.steps[i]);
|
steps.push(option.steps[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,19 +579,19 @@ _last updated ${rate.time.utc().format(options.dtFormat)}_`;
|
||||||
|
|
||||||
function processSteps(bot, currency, rate, amount, steps, option) {
|
function processSteps(bot, currency, rate, amount, steps, option) {
|
||||||
if (steps.length > 0) {
|
if (steps.length > 0) {
|
||||||
var pairName = steps[0];
|
let pairName = steps[0];
|
||||||
if (!options.api[pairName]) {
|
if (!options.api[pairName]) {
|
||||||
msg.channel.send(`There was a configuration error. ${pairName} pair was not found.`);
|
msg.channel.send(`There was a configuration error. ${pairName} pair was not found.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pair = options.api[pairName];
|
let pair = options.api[pairName];
|
||||||
request.get(pair.url, function(error, response, body) {
|
request.get(pair.url, function(error, response, body) {
|
||||||
if (error) {
|
if (error) {
|
||||||
msg.channel.send(err.message ? err.message : 'The request could not be completed at this time. Please try again later.');
|
msg.channel.send(err.message ? err.message : 'The request could not be completed at this time. Please try again later.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pairRate = 0;
|
let pairRate = 0;
|
||||||
try {
|
try {
|
||||||
pairRate = jp.query(JSON.parse(body), pair.path);
|
pairRate = jp.query(JSON.parse(body), pair.path);
|
||||||
if (Array.isArray(pairRate) && pairRate.length > 0) {
|
if (Array.isArray(pairRate) && pairRate.length > 0) {
|
||||||
|
@ -610,7 +610,7 @@ _last updated ${rate.time.utc().format(options.dtFormat)}_`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// final step, cache and then response
|
// final step, cache and then response
|
||||||
var result = {
|
let result = {
|
||||||
rate: rate,
|
rate: rate,
|
||||||
time: moment()
|
time: moment()
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,12 +13,13 @@ exports.purge = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hasPerms(msg)) {
|
if (hasPerms(msg)) {
|
||||||
|
let newamount = 0;
|
||||||
if (!suffix) {
|
if (!suffix) {
|
||||||
var newamount = '2';
|
newamount = 2;
|
||||||
} else {
|
} else {
|
||||||
var amount = Number(suffix);
|
let amount = Number(suffix);
|
||||||
var adding = 1;
|
let adding = 1;
|
||||||
var newamount = amount + adding;
|
newamount = amount + adding;
|
||||||
}
|
}
|
||||||
let messagecount = newamount.toString();
|
let messagecount = newamount.toString();
|
||||||
msg.channel
|
msg.channel
|
||||||
|
|
|
@ -9,42 +9,64 @@ exports.commands = [
|
||||||
];
|
];
|
||||||
|
|
||||||
exports.releasenotes = {
|
exports.releasenotes = {
|
||||||
usage: '',
|
usage: '<desktop/android>',
|
||||||
description: 'gets current release notes from GITHUB',
|
description: 'gets current release notes from GitHub, for either Desktop or Android',
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
|
let releaseType = suffix.toLowerCase();
|
||||||
|
let releaseTypePost = null;
|
||||||
|
if (releaseType === 'android post' || 'desktop post') {
|
||||||
|
releaseTypePost = releaseType.charAt(0).toUpperCase() + releaseType.slice(1,7);
|
||||||
|
console.log('Post message detected ' + releaseTypePost);
|
||||||
|
}
|
||||||
|
let releaseTypeName = releaseType.charAt(0).toUpperCase() + releaseType.slice(1);
|
||||||
|
if (releaseType !== 'android' && releaseType !== 'desktop' && releaseType !== 'android post' && releaseType !== 'desktop post') {
|
||||||
|
msg.reply('Please specify which release notes to display: "desktop" or "android".');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const headers = {
|
const headers = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'User-Agent': 'Super Agent/0.0.1'
|
'User-Agent': 'Super Agent/0.0.1'
|
||||||
};
|
};
|
||||||
// Configure the request
|
// Configure the request
|
||||||
const options = {
|
let options;
|
||||||
url: 'https://api.github.com/repos/lbryio/lbry-desktop/releases/latest',
|
if (releaseTypePost !== null) {
|
||||||
|
options = {
|
||||||
|
url: 'https://api.github.com/repos/lbryio/lbry-' + releaseTypePost + '/releases/latest',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: headers
|
headers: headers
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
console.log('Release being sent: ' + releaseTypeName);
|
||||||
|
options = {
|
||||||
|
url: 'https://api.github.com/repos/lbryio/lbry-' + releaseTypeName + '/releases/latest',
|
||||||
|
method: 'GET',
|
||||||
|
headers: headers
|
||||||
|
};
|
||||||
|
}
|
||||||
// Start the request
|
// Start the request
|
||||||
let message;
|
let message;
|
||||||
request(options, function(error, response, body) {
|
request(options, function(error, response, body) {
|
||||||
let releasemessage = JSON.parse(body).body;
|
let json = JSON.parse(body);
|
||||||
let releasename = JSON.parse(body).name;
|
let releasemessage = json.body;
|
||||||
let releasedate = JSON.parse(body).published_at;
|
console.log(releasemessage);
|
||||||
let releaseurl = JSON.parse(body).html_url;
|
let releasename = json.name || json.tag_name;
|
||||||
|
let releasedate = json.published_at;
|
||||||
|
let releaseurl = json.html_url;
|
||||||
if (releasemessage.length < 2000) {
|
if (releasemessage.length < 2000) {
|
||||||
message = {
|
message = {
|
||||||
embed: {
|
embed: {
|
||||||
title: '*Download ' + releasename + ' here!*',
|
title: '*Download ' + releasename + ' here!*',
|
||||||
description: releasemessage,
|
description: releasemessage.replace('###', ''),
|
||||||
url: releaseurl,
|
url: releaseurl,
|
||||||
color: 7976557,
|
color: 7976557,
|
||||||
timestamp: releasedate,
|
timestamp: releasedate,
|
||||||
author: {
|
author: {
|
||||||
name: 'LBRY Desktop release Notes for ' + releasename,
|
name: 'LBRY ' + releaseType + ' release notes for ' + releasename,
|
||||||
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
||||||
text: 'LBRY Desktop Updated '
|
text: 'LBRY ' + releaseType + ' updated '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -52,7 +74,7 @@ exports.releasenotes = {
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hasPerms(msg) && suffix === 'post') {
|
if (hasPerms(msg) && suffix === 'android post' || 'desktop post') {
|
||||||
bot.channels.get(ChannelID).send(message);
|
bot.channels.get(ChannelID).send(message);
|
||||||
} else {
|
} else {
|
||||||
msg.channel.send(msg.author + ' Release notes sent via DM');
|
msg.channel.send(msg.author + ' Release notes sent via DM');
|
||||||
|
@ -65,105 +87,43 @@ exports.releasenotes = {
|
||||||
.filter(function(n) {
|
.filter(function(n) {
|
||||||
return n !== '';
|
return n !== '';
|
||||||
});
|
});
|
||||||
let releasemessage1 = message[0];
|
let embedmessages = [];
|
||||||
let releasemessage2 = message[1];
|
for (let i = 0; i < message.length; i++) {
|
||||||
let releasemessage3 = message[2];
|
if (message[i]) {
|
||||||
let releasemessage4 = message[3];
|
embedmessages.push({
|
||||||
let releasemessage5 = message[4];
|
|
||||||
let message1 = {
|
|
||||||
embed: {
|
embed: {
|
||||||
title: '*Download ' + releasename + ' here!*',
|
description: message[i],
|
||||||
description: releasemessage1,
|
|
||||||
url: releaseurl,
|
url: releaseurl,
|
||||||
color: 7976557,
|
color: 7976557,
|
||||||
timestamp: releasedate,
|
timestamp: releasedate,
|
||||||
author: {
|
author: {
|
||||||
name: 'LBRY Desktop Release Notes for ' + releasename,
|
name: 'LBRY ' + releaseTypeName + ' release notes for ' + releasename,
|
||||||
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
||||||
text: 'LBRY Desktop Updated '
|
text: 'LBRY ' + releaseTypeName + ' updated '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
let message2 = {
|
if (i === 0) embedmessages[i].embed.title = '*Download ' + releasename + ' here!*';
|
||||||
embed: {
|
|
||||||
description: releasemessage2,
|
|
||||||
color: 7976557,
|
|
||||||
timestamp: releasedate,
|
|
||||||
author: {
|
|
||||||
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
|
||||||
text: 'LBRY Desktop Updated '
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
let message3 = {
|
|
||||||
embed: {
|
|
||||||
description: releasemessage3,
|
|
||||||
color: 7976557,
|
|
||||||
timestamp: releasedate,
|
|
||||||
author: {
|
|
||||||
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
|
||||||
text: 'LBRY Desktop Updated '
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let message4 = {
|
|
||||||
embed: {
|
|
||||||
description: releasemessage4,
|
|
||||||
color: 7976557,
|
|
||||||
timestamp: releasedate,
|
|
||||||
author: {
|
|
||||||
icon_url: 'https://spee.ch/b/Github-PNG-Image.png'
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
|
||||||
text: 'LBRY Desktop Updated '
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let message5 = {
|
|
||||||
embed: {
|
|
||||||
description: releasemessage5,
|
|
||||||
color: 7976557,
|
|
||||||
timestamp: releasedate,
|
|
||||||
author: {
|
|
||||||
icon_url: 'http://www.pngall.com/wp-content/uploads/2016/04/Github-PNG-Image.png'
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png',
|
|
||||||
text: 'LBRY Desktop Updated '
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if (inPrivate(msg)) {
|
if (inPrivate(msg)) {
|
||||||
msg.channel.send(message1);
|
for (let i = 0; i < embedmessages.length; i++) {
|
||||||
msg.channel.send(message2);
|
msg.channel.send(embedmessages[i]);
|
||||||
msg.channel.send(message3);
|
}
|
||||||
msg.channel.send(message4);
|
|
||||||
msg.channel.send(message5);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hasPerms(msg) && suffix === 'post') {
|
if (hasPerms(msg) && suffix === 'android post' || 'desktop post') {
|
||||||
bot.channels.get(ChannelID).send(message1);
|
for (let i = 0; i < embedmessages.length; i++) {
|
||||||
bot.channels.get(ChannelID).send(message2);
|
bot.channels.get(ChannelID).send(embedmessages[i]);
|
||||||
bot.channels.get(ChannelID).send(message3);
|
}
|
||||||
bot.channels.get(ChannelID).send(message4);
|
|
||||||
bot.channels.get(ChannelID).send(message5);
|
|
||||||
} else {
|
} else {
|
||||||
msg.channel.send(msg.author + ' Release notes sent via DM');
|
msg.channel.send(msg.author + ' Release notes sent via DM');
|
||||||
msg.author.send(message1);
|
for (let i = 0; i < embedmessages.length; i++) {
|
||||||
msg.author.send(message2);
|
msg.author.send(embedmessages[i]);
|
||||||
msg.author.send(message3);
|
}
|
||||||
msg.author.send(message4);
|
|
||||||
msg.author.send(message5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,93 +13,75 @@ exports.addrole = {
|
||||||
usage: '<role>',
|
usage: '<role>',
|
||||||
description: 'Adds you to specified role',
|
description: 'Adds you to specified role',
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
//rolelist.allowedroles = rolelist.allowedroles.map(v => v.toLowerCase());
|
// Provide shortened syntax for the sake of code cleanliness
|
||||||
|
let send = msgTxt => msg.channel.send(msgTxt);
|
||||||
|
// Checks if the user has messaged the bot via Direct Message
|
||||||
|
if (inPrivate(msg)) return send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
||||||
|
|
||||||
// Here the bot, msg and suffix is avaible, this function can be async if needed.
|
// Here the bot, msg and suffix is avaible, this function can be async if needed.
|
||||||
let newrole = msg.guild.roles.find('name', suffix);
|
// Make sure to eliminate case sensitivity, do this here to only perform the sweep once.
|
||||||
let baserole = msg.guild.roles.find('name', rolelist.baserole);
|
let newrole = msg.guild.roles.find(role => role.name.toLowerCase() === suffix.toLowerCase());
|
||||||
// Checks if the user put a role in the message.
|
// Baserole is assumed to already be case accurate as it's handled in the config itself.
|
||||||
if (inPrivate(msg)) {
|
let baserole = msg.guild.roles.find(item => item.name === rolelist.baserole);
|
||||||
msg.channel.send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
|
||||||
return;
|
let rolecmd = botconfig.prefix + 'roles';
|
||||||
} else {
|
|
||||||
if (suffix) {
|
// Checks if the user included a role in their message
|
||||||
//suffix = suffix.toLowerCase();
|
if (!suffix) return send('Please specify a role. Type ' + rolecmd + ' to see which you may add yourself!');
|
||||||
// Checks if the role mentioned in the message is in the allowed roles listed in the wunderbot config.
|
// Checks if there is a matching role found on the server
|
||||||
if (rolelist.allowedroles.includes(suffix) || rolelist.baserole.includes(suffix)) {
|
if (!newrole) return send('The role specified `' + suffix + '` does not exist on this server!');
|
||||||
// Checks if the role even exists in the discord server
|
// Checks that the allowed roles and base role against the matched role's name, since this eliminates case sensitivity issues
|
||||||
if (newrole !== null) {
|
if (!rolelist.allowedroles.includes(newrole.name) && !rolelist.baserole.includes(newrole.name)) return send("That role isn't one you can add yourself to! Type " + rolecmd + ' command to find out which ones are allowed.');
|
||||||
// Checks if the member has the role that they are trying to add
|
// Use the matched name to check against the member's existing roles
|
||||||
if (!msg.member.roles.find('name', suffix)) {
|
if (msg.member.roles.find(item => item.name === newrole.name)) return send('It seems you already have the ' + newrole.name + 'role');
|
||||||
msg.member.addRole(newrole).then(msg.channel.send(msg.member + ' has been added to the ' + suffix + ' role!'));
|
|
||||||
if (rolelist.baserole !== ' ') {
|
// Assuming all these factors succeed, add the role
|
||||||
if (baserole !== null) {
|
msg.member.addRole(newrole).then(send(msg.member + ' has been added to the ' + newrole.name + ' role!'));
|
||||||
// Checks if Member has the baserole, and also checks if they just added the baserole
|
|
||||||
if (!msg.member.roles.find('name', rolelist.baserole) && suffix !== rolelist.baserole) {
|
// Check if a baserole is actually set
|
||||||
msg.member.addRole(baserole).then(msg.channel.send(msg.member + ' has been added to the ' + rolelist.baserole + ' role!'));
|
if (!rolelist.baserole) return;
|
||||||
}
|
// Confirm that the role exists on the server and if not then be sure to send a nag message
|
||||||
} else {
|
if (!baserole) return send('The base role of ' + rolelist.baserole + ' has been set in config but is missing from the server');
|
||||||
msg.channel.send('The ' + rolelist.baserole + " Role doesn't exist. Please add that role first!");
|
// Confirm if the user has the baserole already, including if it was added just now
|
||||||
}
|
if (msg.member.roles.find(item => item.name === baserole.name)) return;
|
||||||
}
|
// Add the base role and avoid spamming the user by only mentioning them in the previous message
|
||||||
} else {
|
msg.member.addRole(baserole).then(send('We also added the base ' + rolelist.baserole + ' role for you!'));
|
||||||
msg.channel.send('It seems that you already have that role! Try removing it first with the ' + botconfig.prefix + 'delrole command!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send('The role ' + '`' + suffix + '`' + ' does not exist!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send("That role isn't one you can add yourself to! Please run the " + botconfig.prefix + 'roles command to find out which ones are allowed.');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send('Please specify a role. Type ' + botconfig.prefix + 'roles to see which you may add!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.delrole = {
|
exports.delrole = {
|
||||||
usage: '<role>',
|
usage: '<role>',
|
||||||
description: 'Deletes the specified role from your account',
|
description: 'Deletes the specified role from your account',
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
|
// Provide shortened syntax for the sake of code cleanliness
|
||||||
|
let send = msgTxt => msg.channel.send(msgTxt);
|
||||||
|
// Checks if the user has messaged the bot via Direct Message
|
||||||
|
if (inPrivate(msg)) return send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
||||||
// Here in the bot, msg and suffix are available, this function can be async if needed.
|
// Here in the bot, msg and suffix are available, this function can be async if needed.
|
||||||
let oldrole = msg.guild.roles.find('name', suffix);
|
// Make sure to eliminate case sensitivity, do this here to only perform the sweep once.
|
||||||
// Checks if the user put a role in the message.
|
let oldrole = msg.guild.roles.find(role => role.name.toLowerCase() === suffix.toLowerCase());
|
||||||
if (inPrivate(msg)) {
|
let rolecmd = botconfig.prefix + 'roles';
|
||||||
msg.channel.send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
// Checks if the user included a role in their message
|
||||||
return;
|
if (!suffix) return send('Please specify a role. Type ' + rolecmd + ' to see which you may remove yourself!');
|
||||||
} else {
|
// Checks if there is a matching role found on the server
|
||||||
if (suffix) {
|
if (!oldrole) return send('The role specified `' + suffix + '` does not exist on this server!');
|
||||||
// Checks if the role mentioned in the message is in the allowed roles listed in the Wunderbot config.
|
// Checks that the allowed roles against the matched role's name, since this eliminates case sensitivity issues
|
||||||
if (rolelist.allowedroles.includes(suffix)) {
|
if (!rolelist.allowedroles.includes(oldrole.name)) return send("That role isn't one you can remove yourself! If you need it removed, please ask a moderator!");
|
||||||
// Checks if the role exists in the Discord server
|
// Use the matched name to check against the member's existing roles
|
||||||
if (oldrole !== null) {
|
if (!msg.member.roles.find(item => item.name === oldrole.name)) return send("It seems you don't actually have the " + oldrole.name + 'role! Mission accomplished!');
|
||||||
// Checks if the member has the role that they are trying to add
|
|
||||||
if (msg.member.roles.find('name', suffix)) {
|
// Assuming all these factors succeed, add the role
|
||||||
msg.member.removeRole(oldrole).then(msg.channel.send(msg.member + ' has been removed from the ' + suffix + ' role!'));
|
msg.member.removeRole(oldrole).then(send(msg.member + ' has been removed from the ' + oldrole.name + ' role!'));
|
||||||
} else {
|
|
||||||
msg.channel.send("You don't seem to have that role! Try adding it first with the " + botconfig.prefix + 'addrole command!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send('The role ' + '`' + suffix + '`' + ' does not exist!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send("That role isn't one you can add yourself to! Please run the " + botconfig.prefix + 'roles command to find out which ones are allowed.');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
msg.channel.send('Please specify a role. Type ' + botconfig.prefix + 'roles to see which you may add!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.roles = {
|
exports.roles = {
|
||||||
usage: '',
|
usage: '',
|
||||||
description: 'displays roles you can give yourself',
|
description: 'displays roles you can give yourself',
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
if (inPrivate(msg)) {
|
let send = msgTxt => msg.channel.send(msgTxt);
|
||||||
msg.channel.send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
if (inPrivate(msg)) return send('You can not set roles in DMs! Please go to the Discord server to do this.');
|
||||||
return;
|
else {
|
||||||
} else {
|
|
||||||
// Here in the bot, msg and suffix are available, this function can be async if needed.
|
// Here in the bot, msg and suffix are available, this function can be async if needed.
|
||||||
msg.channel.send({
|
send({
|
||||||
embed: {
|
embed: {
|
||||||
color: 3447003,
|
color: 3447003,
|
||||||
title: 'Wunderbot',
|
title: 'Wunderbot',
|
||||||
|
@ -132,7 +114,6 @@ exports.roles = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//msg.channel.send(JSON.stringify(rolelist.allowedroles));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,69 +1,68 @@
|
||||||
let needle = require('needle');
|
let needle = require('needle');
|
||||||
let statsurl = 'https://coinmarketcap.com/currencies/library-credit/';
|
let statsurl = 'https://www.coingecko.com/en/coins/lbry-credits';
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
'stats' // command that is in this file, every command needs it own export as shown below
|
'stats' // command that is in this file, every command needs it own export as shown below
|
||||||
];
|
];
|
||||||
|
|
||||||
exports.stats = {
|
exports.stats = {
|
||||||
usage: '',
|
usage: '',
|
||||||
description: 'Displays list of current Market stats',
|
description: 'Displays list of Current Market Statistics',
|
||||||
process: function(bot, msg) {
|
process: function(bot, msg) {
|
||||||
needle.get('https://api.coinmarketcap.com/v2/ticker/1298/?convert=BTC', function(error, response) {
|
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false&price_change_percentage=24h%2C1h%2C7d', function(error, response) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
msg.channel.send('coinmarketcap API is not available');
|
msg.channel.send('coingecko API is not available');
|
||||||
} else {
|
} else {
|
||||||
let data = response.body.data;
|
// console.log(response);
|
||||||
let rank = data.rank;
|
// console.log(response.body[0]);
|
||||||
let price_usd = Number(data.quotes.USD.price);
|
let data = response.body[0];
|
||||||
let price_btc = Number(data.quotes.BTC.price);
|
let rank = data.market_cap_rank;
|
||||||
let market_cap_usd = Number(data.quotes.USD.market_cap);
|
let price_btc = Number(data.current_price);
|
||||||
let circulating_supply = Number(data.circulating_supply);
|
let circulating_supply = Number(data.circulating_supply);
|
||||||
let total_supply = Number(data.total_supply);
|
let total_supply = Number(data.total_supply);
|
||||||
let percent_change_1h = Number(data.quotes.USD.percent_change_1h);
|
let percent_change_1h = Number(data.price_change_percentage_1h_in_currency);
|
||||||
let percent_change_24h = Number(data.quotes.USD.percent_change_24h);
|
let percent_change_24h = Number(data.price_change_percentage_24h_in_currency);
|
||||||
let volume24_usd = Number(data.quotes.USD.volume_24h);
|
|
||||||
let dt = new Date();
|
let dt = new Date();
|
||||||
let timestamp = dt.toUTCString();
|
let timestamp = dt.toUTCString();
|
||||||
let hr_indicator = ':thumbsup:';
|
let hr_indicator = (percent_change_1h < 0) ? ':thumbsdown:' : ':thumbsup:';
|
||||||
let day_indicator = ':thumbsup:';
|
let day_indicator = (percent_change_24h < 0) ? ':thumbsdown:' : ':thumbsup:';
|
||||||
if (percent_change_1h < 0) {
|
|
||||||
hr_indicator = ':thumbsdown:';
|
|
||||||
}
|
|
||||||
if (percent_change_24h < 0) {
|
|
||||||
day_indicator = ':thumbsdown:';
|
|
||||||
}
|
|
||||||
|
|
||||||
needle.get('https://api.coinmarketcap.com/v2/ticker/1298/?convert=GBP', function(error, response) {
|
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=gbp&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false', function (error, response) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
msg.channel.send('coinmarketcap API is not available');
|
msg.channel.send('coingecko API is not available');
|
||||||
} else {
|
} else {
|
||||||
data = response.body.data;
|
data = response.body[0];
|
||||||
let price_gbp = Number(data.quotes.GBP.price);
|
let price_gbp = Number(data.current_price);
|
||||||
needle.get('https://api.coinmarketcap.com/v2/ticker/1298/?convert=EUR', function(error, response) {
|
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=eur&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false', function (error, response) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
msg.channel.send('coinmarketcap API is not available');
|
msg.channel.send('coingecko API is not available');
|
||||||
} else {
|
} else {
|
||||||
data = response.body.data;
|
data = response.body[0];
|
||||||
let price_eur = Number(data.quotes.EUR.price);
|
let price_eur = Number(data.current_price);
|
||||||
|
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false', function (error, response) {
|
||||||
|
if (error || response.statusCode !== 200) {
|
||||||
|
msg.channel.send('coingecko API is not available');
|
||||||
|
} else {
|
||||||
|
data = response.body[0];
|
||||||
|
let price_usd = Number(data.current_price);
|
||||||
|
let market_cap_usd = Number(data.market_cap);
|
||||||
|
let volume24_usd = Number(data.total_volume);
|
||||||
let description = `**Rank: [${rank}](${statsurl})**
|
let description = `**Rank: [${rank}](${statsurl})**
|
||||||
**Data**
|
**Data**
|
||||||
Market Cap: [$${numberWithCommas(market_cap_usd)}](${statsurl})
|
Market Cap: [$${numberWithCommas(market_cap_usd)}](${statsurl})
|
||||||
Total Supply: [${numberWithCommas(total_supply)} LBC](${statsurl})
|
Total Supply: [${numberWithCommas(total_supply)} LBC](${statsurl})
|
||||||
Circulating Supply: [${numberWithCommas(circulating_supply)} LBC](${statsurl})
|
Circulating Supply: [${numberWithCommas(circulating_supply.toFixed(0))} LBC](${statsurl})
|
||||||
24 Hour Volume: [$${volume24_usd}](${statsurl})
|
24 Hour Volume: [$${numberWithCommas(volume24_usd)}](${statsurl})
|
||||||
|
|
||||||
**Price**
|
**Price**
|
||||||
BTC: [₿${price_btc.toFixed(8)}](${statsurl})
|
BTC: [₿${price_btc.toFixed(8)}](${statsurl})
|
||||||
USD: [$${price_usd.toFixed(2)}](${statsurl})
|
USD: [$${price_usd.toFixed(5)}](${statsurl})
|
||||||
EUR: [€${price_eur.toFixed(2)}](${statsurl})
|
EUR: [€${price_eur.toFixed(5)}](${statsurl})
|
||||||
GBP: [£${price_gbp.toFixed(2)}](${statsurl})
|
GBP: [£${price_gbp.toFixed(5)}](${statsurl})
|
||||||
|
|
||||||
**% Change**
|
**% Change**
|
||||||
1 Hour: [${percent_change_1h}](${statsurl}) ${hr_indicator}
|
1 Hour: [${percent_change_1h.toFixed(2)}%](${statsurl}) ${hr_indicator}
|
||||||
|
|
||||||
1 Day: [${percent_change_24h}](${statsurl}) ${day_indicator}
|
1 Day: [${percent_change_24h.toFixed(2)}%](${statsurl}) ${day_indicator}`;
|
||||||
|
|
||||||
`;
|
|
||||||
const embed = {
|
const embed = {
|
||||||
description: description,
|
description: description,
|
||||||
color: 7976557,
|
color: 7976557,
|
||||||
|
@ -71,7 +70,7 @@ GBP: [£${price_gbp.toFixed(2)}](${statsurl})
|
||||||
text: 'Last Updated: ' + timestamp
|
text: 'Last Updated: ' + timestamp
|
||||||
},
|
},
|
||||||
author: {
|
author: {
|
||||||
name: 'Coin Market Cap Stats (LBC)',
|
name: 'Coin Gecko Stats (LBC)',
|
||||||
url: statsurl,
|
url: statsurl,
|
||||||
icon_url: 'https://spee.ch/2/pinkylbryheart.png'
|
icon_url: 'https://spee.ch/2/pinkylbryheart.png'
|
||||||
}
|
}
|
||||||
|
@ -104,4 +103,7 @@ GBP: [£${price_gbp.toFixed(2)}](${statsurl})
|
||||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,22 @@
|
||||||
"icon_url": "https://spee.ch/2/pinkylbryheart.png"
|
"icon_url": "https://spee.ch/2/pinkylbryheart.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"!whitepaper": {
|
||||||
|
"usage": "",
|
||||||
|
"description": "LBRY White Paper",
|
||||||
|
"operation": "send",
|
||||||
|
"bundle": {
|
||||||
|
"url": "https://spec.lbry.com/",
|
||||||
|
"title": "",
|
||||||
|
"description": "The [LBRY White Paper](https://spec.lbry.com/) defines the LBRY protocol, its components, and how they fit together. \nThis document assumes that the reader is familiar with distributed hash tables (DHTs), the BitTorrent protocol, Bitcoin, and blockchain technology in general. It does not attempt to document these technologies or explain how they work.",
|
||||||
|
"color": 16777215,
|
||||||
|
"author": {
|
||||||
|
"name": "LBRY White Paper",
|
||||||
|
"url": "https://spec.lbry.com/",
|
||||||
|
"icon_url": "https://spee.ch/0/info-white.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"!begging": {
|
"!begging": {
|
||||||
"usage": "",
|
"usage": "",
|
||||||
|
@ -39,11 +55,11 @@
|
||||||
"url": "",
|
"url": "",
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "Please don't request free coins or invites, we have a strict policy against begging. Further offenses will result in removal from the chat.",
|
"description": "Please don't request free coins or invites, we have a strict policy against begging. Further offenses will result in removal from the chat.",
|
||||||
"color": 7976557,
|
"color": 16718635,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "BEGGING!",
|
"name": "BEGGING!",
|
||||||
"url": "",
|
"url": "",
|
||||||
"icon_url": "https://spee.ch/7/LBRY-Discord-Warning.png"
|
"icon_url": "https://spee.ch/8/caution-red.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -263,11 +279,11 @@
|
||||||
"url": "",
|
"url": "",
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "Please keep conversations on topic, or move random conversations to #random if you wish to continue",
|
"description": "Please keep conversations on topic, or move random conversations to #random if you wish to continue",
|
||||||
"color": 7976557,
|
"color": 16764237,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Random",
|
"name": "Random",
|
||||||
"url": "",
|
"url": "",
|
||||||
"icon_url": "https://spee.ch/7/LBRY-Discord-Warning.png"
|
"icon_url": "https://spee.ch/3/question-orange.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -383,22 +399,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"!rewardsapprove": {
|
|
||||||
"usage": "",
|
|
||||||
"description": "How to become Rewards approved",
|
|
||||||
"operation": "send",
|
|
||||||
"bundle": {
|
|
||||||
"url": "",
|
|
||||||
"title": "",
|
|
||||||
"description": "Please download the latest version from [HERE](https://lbry.com/get) Upon install, you'll be greeted with a welcome message. If you already had the app installed, please go to the wallet (bank icon in the top right) > Rewards - This should show your current status. New users will need to get their rewards approved in order to access Rewards. Type !cc or see the !rewardsapproval information below.",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "How to become Rewards approved",
|
|
||||||
"url": "",
|
|
||||||
"icon_url": "https://spee.ch/2/pinkylbryheart.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"!verify": {
|
"!verify": {
|
||||||
"usage": "",
|
"usage": "",
|
||||||
"description": "How to become Rewards approved",
|
"description": "How to become Rewards approved",
|
||||||
|
@ -431,22 +431,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"!verification": {
|
|
||||||
"usage": "",
|
|
||||||
"description": "Rewards Approval Help Message",
|
|
||||||
"operation": "send",
|
|
||||||
"bundle": {
|
|
||||||
"url": "",
|
|
||||||
"title": "",
|
|
||||||
"description": "If you would like to be approved for rewards, please go to <#571001864271691805> and send a Direct Message to @RewardsBot#0287 \n You can do this by right clicking on the name, and selecting Message. . A LBRY mod will get back to you as soon as possible. We appreciate your patience. Only one account per household is allowed access to LBRY Rewards. Check out our [Rewards FAQ](https://lbry.io/faq/rewards) to know more about rewards.",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "Applying for Rewards Approval",
|
|
||||||
"url": "",
|
|
||||||
"icon_url": "https://spee.ch/2/pinkylbryheart.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"!logfile": {
|
"!logfile": {
|
||||||
"usage": "",
|
"usage": "",
|
||||||
"description": "How to Find LBRY App Log File?",
|
"description": "How to Find LBRY App Log File?",
|
||||||
|
@ -913,7 +897,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"!why": {
|
||||||
|
"usage": "",
|
||||||
|
"description": "Why should I use LBRY?",
|
||||||
|
"operation": "send",
|
||||||
|
"bundle": {
|
||||||
|
"url": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "LBRY is a new protocol which allows anyone to build apps that interact with digital content on the LBRY network. Apps built on the protocol allow creators to upload their work to the LBRY network of hosts (like BitTorrent), and set a price per stream or download (like iTunes) or give it away for free (like YouTube without ads). It benefits the consumer, because there's no ads, and you can often buy things cheaper on LBRY, and it benefits the creator, because there's no risk of demonetization, essentially no fees, and it's a lot harder to censor. You can find out more on the [FAQ](https://lbry.com/faq), or ask anyone here for their experience!",
|
||||||
|
"color": 7976557,
|
||||||
|
"author": {
|
||||||
|
"name": "Why should I use LBRY?",
|
||||||
|
"url": "https://lbry.com/faq",
|
||||||
|
"icon_url": "https://spee.ch/2/pinkylbryheart.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"!piratebay": {
|
"!piratebay": {
|
||||||
"usage": "",
|
"usage": "",
|
||||||
"description": "Why LBRY has piratebay.com",
|
"description": "Why LBRY has piratebay.com",
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
},
|
},
|
||||||
"rolelist": {
|
"rolelist": {
|
||||||
"baserole": "LBRYian",
|
"baserole": "LBRYian",
|
||||||
"allowedroles": ["NSFW", "Traders", "Miners", "Off-Topic Chats", "International", "Dev"]
|
"allowedroles": ["Off-Topic Chats", "Dev"]
|
||||||
},
|
},
|
||||||
"irc": {
|
"irc": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
|
|
24
package-lock.json
generated
24
package-lock.json
generated
|
@ -2599,9 +2599,9 @@
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||||
},
|
},
|
||||||
"mixin-deep": {
|
"mixin-deep": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
|
||||||
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
|
"integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"for-in": "^1.0.2",
|
"for-in": "^1.0.2",
|
||||||
|
@ -2633,23 +2633,13 @@
|
||||||
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
|
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
|
||||||
},
|
},
|
||||||
"mongodb": {
|
"mongodb": {
|
||||||
"version": "3.2.7",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.2.tgz",
|
||||||
"integrity": "sha512-2YdWrdf1PJgxcCrT1tWoL6nHuk6hCxhddAAaEh8QJL231ci4+P9FLyqopbTm2Z2sAU6mhCri+wd9r1hOcHdoMw==",
|
"integrity": "sha512-fqJt3iywelk4yKu/lfwQg163Bjpo5zDKhXiohycvon4iQHbrfflSAz9AIlRE6496Pm/dQKQK5bMigdVo2s6gBg==",
|
||||||
"requires": {
|
|
||||||
"mongodb-core": "3.2.7",
|
|
||||||
"safe-buffer": "^5.1.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mongodb-core": {
|
|
||||||
"version": "3.2.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.7.tgz",
|
|
||||||
"integrity": "sha512-WypKdLxFNPOH/Jy6i9z47IjG2wIldA54iDZBmHMINcgKOUcWJh8og+Wix76oGd7EyYkHJKssQ2FAOw5Su/n4XQ==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bson": "^1.1.1",
|
"bson": "^1.1.1",
|
||||||
"require_optional": "^1.0.1",
|
"require_optional": "^1.0.1",
|
||||||
"safe-buffer": "^5.1.2",
|
"safe-buffer": "^5.1.2"
|
||||||
"saslprep": "^1.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mongoose": {
|
"mongoose": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue