mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-23 17:47:27 +00:00
Fixed formating and added prettier to pre-commit.
Fixed the formatting, added prettier to auto run on pre-commit.
This commit is contained in:
parent
1836a2eaa4
commit
6ce8aade5b
19 changed files with 2634 additions and 1616 deletions
55
README.md
55
README.md
|
@ -1,42 +1,55 @@
|
||||||
# Bot for [LBRY's Discord](https://discord.gg/tgnNHf5)
|
# Bot for [LBRY's Discord](https://discord.gg/tgnNHf5)
|
||||||
|
|
||||||
(This README will be updated along with bot updates)
|
(This README will be updated along with bot updates)
|
||||||
|
|
||||||
## Features:
|
## Features:
|
||||||
|
|
||||||
- Tipbot for LBC. Responds to `!tip`.
|
* Tipbot for LBC. Responds to `!tip`.
|
||||||
- Price bot displays price of lbc for currency given. Responds to `!price <cur> <amount>`
|
* Price bot displays price of lbc for currency given. Responds to `!price <cur>
|
||||||
- Stats bot display current market stats of lbc. Responds to `!stats`
|
<amount>`
|
||||||
- Hash bot displays current hashrate of network. Responds to `!hash`
|
* Stats bot display current market stats of lbc. Responds to `!stats`
|
||||||
- Github Release Notes bot displays release notes for current lbry-app release.
|
* Hash bot displays current hashrate of network. Responds to `!hash`
|
||||||
|
* Github Release Notes bot displays release notes for current lbry-app release.
|
||||||
|
|
||||||
Responds to `!releasenotes`
|
Responds to `!releasenotes` User with Defined Perms `!releasenotes post` to
|
||||||
|
send to specified channel
|
||||||
|
|
||||||
User with Defined Perms `!releasenotes post` to send to specified channel
|
* Purge Bot (moderator only) deletes X amount of messages. User with Defined
|
||||||
|
Perms Responds to `!purge <X>`
|
||||||
- Purge Bot (moderator only) deletes X amount of messages. User with Defined Perms Responds to `!purge <X>`
|
* Speech bot displays top claim from provided image name(coming soon posting to
|
||||||
- Speech bot displays top claim from provided image name(coming soon posting to speech).
|
speech).
|
||||||
|
|
||||||
Responds to `!speech <imagename>`
|
Responds to `!speech <imagename>`
|
||||||
|
|
||||||
- Welcome bot sends Direct Message when new users join, User with Defined Perms can send using `!welcome <@username>`
|
* Welcome bot sends Direct Message when new users join, User with Defined Perms
|
||||||
- Spam Detection Bot to Prevent Discord Raids and Spammers
|
can send using `!welcome <@username>`
|
||||||
- Dynamic plugin loading with permission support.
|
* Spam Detection Bot to Prevent Discord Raids and Spammers
|
||||||
|
* Dynamic plugin loading with permission support.
|
||||||
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- node > 8.0.0
|
* node > 8.0.0
|
||||||
- npm > 0.12.x
|
* npm > 0.12.x
|
||||||
|
* yarn ( install with npm install -g yarn if not installed )
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Create a bot and get the bot's API Token: https://discordapp.com/developers/applications/me
|
Create a bot and get the bot's API Token:
|
||||||
|
https://discordapp.com/developers/applications/me
|
||||||
|
|
||||||
Edit and rename default.json.example in /config, then cd to wunderbot directory and run:
|
Edit and rename default.json.example in /config, then cd to wunderbot directory
|
||||||
|
and run:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install
|
yarn install
|
||||||
node bot/bot.js
|
node bot/bot.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Be sure to run the command below before working on any code, this ensures
|
||||||
|
prettier goes to work and keeps code to our standard.
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn install --production=false
|
||||||
|
```
|
||||||
|
|
28
bot/bot.js
28
bot/bot.js
|
@ -1,10 +1,10 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
// Load up libraries
|
// Load up libraries
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
// Load config!
|
// Load config!
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
config = config.get('bot');
|
config = config.get("bot");
|
||||||
|
|
||||||
var aliases;
|
var aliases;
|
||||||
try {
|
try {
|
||||||
|
@ -12,12 +12,12 @@ try {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//No aliases defined
|
//No aliases defined
|
||||||
aliases = {
|
aliases = {
|
||||||
"test": {
|
test: {
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
msg.channel.send('test');
|
msg.channel.send("test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
var commands = {
|
var commands = {
|
||||||
ping: {
|
ping: {
|
||||||
|
@ -43,9 +43,7 @@ bot.on("ready", function() {
|
||||||
);
|
);
|
||||||
require("./plugins.js").init();
|
require("./plugins.js").init();
|
||||||
console.log("type " + config.prefix + "help in Discord for a commands list.");
|
console.log("type " + config.prefix + "help in Discord for a commands list.");
|
||||||
bot.user.setGame(
|
bot.user.setGame(config.prefix + "help | Tipping not available");
|
||||||
config.prefix + "help | Tipping not available"
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("disconnected", function() {
|
bot.on("disconnected", function() {
|
||||||
|
@ -57,7 +55,13 @@ 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)) {
|
||||||
console.log(
|
console.log(
|
||||||
"treating " + msg.content + " from UserID:" + msg.author + " || UserName: " + msg.author.username + " as command"
|
"treating " +
|
||||||
|
msg.content +
|
||||||
|
" from UserID:" +
|
||||||
|
msg.author +
|
||||||
|
" || UserName: " +
|
||||||
|
msg.author.username +
|
||||||
|
" as command"
|
||||||
);
|
);
|
||||||
var cmdTxt = msg.content.split(" ")[0].substring(config.prefix.length);
|
var cmdTxt = msg.content.split(" ")[0].substring(config.prefix.length);
|
||||||
var suffix = msg.content.substring(
|
var suffix = msg.content.substring(
|
||||||
|
@ -185,7 +189,7 @@ exports.addCustomFunc = function(customFunc) {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
exports.commandCount = function() {
|
exports.commandCount = function() {
|
||||||
return Object.keys(commands).length;
|
return Object.keys(commands).length;
|
||||||
};
|
};
|
||||||
|
|
101
bot/helpers.js
101
bot/helpers.js
|
@ -1,80 +1,79 @@
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let permRanks = config.get('moderation');
|
let permRanks = config.get("moderation");
|
||||||
let speechBotChannels = config.get('speechbot');
|
let speechBotChannels = config.get("speechbot");
|
||||||
let priceBotChannels = config.get('pricebot');
|
let priceBotChannels = config.get("pricebot");
|
||||||
let ExcludedSpam = config.get('spamdetection');
|
let ExcludedSpam = config.get("spamdetection");
|
||||||
let hashBotChannels = config.get('hashbot');
|
let hashBotChannels = config.get("hashbot");
|
||||||
let statsBotChannels = config.get('statsbot');
|
let statsBotChannels = config.get("statsbot");
|
||||||
|
|
||||||
// Checks if user is allowed to use a command only for mods/team members
|
// Checks if user is allowed to use a command only for mods/team members
|
||||||
exports.hasPerms = function(msg){
|
exports.hasPerms = function(msg) {
|
||||||
if(msg.member.roles.some(r=>permRanks.perms.includes(r.name)) ) {
|
if (msg.member.roles.some(r => permRanks.perms.includes(r.name))) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if command was sent in dm
|
|
||||||
exports.inPrivate = function(msg){
|
|
||||||
if(msg.channel.type == 'dm'){
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
// Check if command was sent in dm
|
||||||
|
exports.inPrivate = function(msg) {
|
||||||
|
if (msg.channel.type == "dm") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a channel in speechBot Channels list
|
// Checks if Message was sent from a channel in speechBot Channels list
|
||||||
exports.hasSpeechBotChannels = function(msg){
|
exports.hasSpeechBotChannels = function(msg) {
|
||||||
if(speechBotChannels.channels.includes(msg.channel.id) ) {
|
if (speechBotChannels.channels.includes(msg.channel.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a channel in priceBot Channels list
|
// Checks if Message was sent from a channel in priceBot Channels list
|
||||||
exports.hasPriceBotChannels = function(msg){
|
exports.hasPriceBotChannels = function(msg) {
|
||||||
if(priceBotChannels.channels.includes(msg.channel.id) ) {
|
if (priceBotChannels.channels.includes(msg.channel.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a Excluded channel
|
// Checks if Message was sent from a Excluded channel
|
||||||
exports.hasExcludedSpamChannels = function(msg){
|
exports.hasExcludedSpamChannels = function(msg) {
|
||||||
if(ExcludedSpam.channels.includes(msg.channel.id) ) {
|
if (ExcludedSpam.channels.includes(msg.channel.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a Excluded user
|
// Checks if Message was sent from a Excluded user
|
||||||
exports.hasExcludedSpamUsers = function(msg){
|
exports.hasExcludedSpamUsers = function(msg) {
|
||||||
if(ExcludedSpam.users.includes(msg.author.id) ) {
|
if (ExcludedSpam.users.includes(msg.author.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a channel in hashBot Channels list
|
// Checks if Message was sent from a channel in hashBot Channels list
|
||||||
exports.hasHashBotChannels = function(msg){
|
exports.hasHashBotChannels = function(msg) {
|
||||||
if(hashBotChannels.channels.includes(msg.channel.id) ) {
|
if (hashBotChannels.channels.includes(msg.channel.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Checks if Message was sent from a channel in statsBot Channels list
|
// Checks if Message was sent from a channel in statsBot Channels list
|
||||||
exports.hasStatsBotChannels = function(msg){
|
exports.hasStatsBotChannels = function(msg) {
|
||||||
if(statsBotChannels.channels.includes(msg.channel.id) ) {
|
if (statsBotChannels.channels.includes(msg.channel.id)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let miningChannel = config.get('Channels').mining;
|
let miningChannel = config.get("Channels").mining;
|
||||||
let randomChannel = config.get('Channels').random;
|
let randomChannel = config.get("Channels").random;
|
||||||
let verificationChannel = config.get('Channels').verification;
|
let verificationChannel = config.get("Channels").verification;
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"helpcommands",
|
"helpcommands",
|
||||||
|
@ -36,496 +36,588 @@ exports.commands = [
|
||||||
"email",
|
"email",
|
||||||
"cli",
|
"cli",
|
||||||
"ipfstorrent"
|
"ipfstorrent"
|
||||||
]
|
];
|
||||||
|
|
||||||
exports.helpcommands = {
|
exports.helpcommands = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Displays Helpful Commands:\n!what, !beta, !begging, !github, !appdownload, !daemondownload, !directories, !faq, !name, !mining, !pricestance, !publisher, !publish, !random, !referrals, !rewards, !rewardsvsreferrals, !cc, !verify, !verification, !logfile, !backup, !startup, !streamingissues, !ports, !migrate, !tipping, !email, !cli, !ipfstorrent',
|
description:
|
||||||
process: function(bot,msg){
|
"Displays Helpful Commands:\n!what, !beta, !begging, !github, !appdownload, !daemondownload, !directories, !faq, !name, !mining, !pricestance, !publisher, !publish, !random, !referrals, !rewards, !rewardsvsreferrals, !cc, !verify, !verification, !logfile, !backup, !startup, !streamingissues, !ports, !migrate, !tipping, !email, !cli, !ipfstorrent",
|
||||||
msg.channel.send(
|
process: function(bot, msg) {
|
||||||
{
|
msg.channel.send({
|
||||||
"embed":{
|
embed: {
|
||||||
"description": "**!what, !beta, !begging, !github, !appdownload, !daemondownload, !directories, !faq, !name, !mining, !pricestance, !publisher, !publish, !random, !referrals, !rewards, !rewardsvsreferrals, !cc, !verify, !verification, !logfile, !backup, !startup, !streamingissues, !ports, !migrate, !tipping, !email, !cli, !ipfstorrent**",
|
description:
|
||||||
"color": 7976557,
|
"**!what, !beta, !begging, !github, !appdownload, !daemondownload, !directories, !faq, !name, !mining, !pricestance, !publisher, !publish, !random, !referrals, !rewards, !rewardsvsreferrals, !cc, !verify, !verification, !logfile, !backup, !startup, !streamingissues, !ports, !migrate, !tipping, !email, !cli, !ipfstorrent**",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "List of Helpful LBRY Commands",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "List of Helpful LBRY Commands",
|
||||||
}}}
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
exports.what = {
|
exports.what = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'What is Lbry?',
|
description: "What is Lbry?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"title": "*Click Here for more Info!*",
|
title: "*Click Here for more Info!*",
|
||||||
"description": "[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Get the App here**_](https://lbry.io/get)",
|
description:
|
||||||
"url": "https://lbry.io/what",
|
"[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Get the App here**_](https://lbry.io/get)",
|
||||||
"color": 7976557,
|
url: "https://lbry.io/what",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "What is LBRY?",
|
author: {
|
||||||
"url": "https://lbry.io/what",
|
name: "What is LBRY?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/what",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.appdownload = {
|
exports.appdownload = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'LBRY-app Installers',
|
description: "LBRY-app Installers",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "**Installers for the LBRY Application are available for download** [**HERE**](https://lbry.io/get)",
|
description:
|
||||||
"color": 7976557,
|
"**Installers for the LBRY Application are available for download** [**HERE**](https://lbry.io/get)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Get The App",
|
author: {
|
||||||
"url": "https://lbry.io/get",
|
name: "Get The App",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/get",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.begging = {
|
exports.begging = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Dont Request Free Coins Message',
|
description: "Dont Request Free Coins Message",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"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:
|
||||||
"color": 7976557,
|
"**Please don't request free coins or invites, we have a strict policy against begging. Further offenses will result in removal from the chat.**",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "BEGGING!",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "BEGGING!",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.beta = {
|
exports.beta = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'beta message',
|
description: "beta message",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Even though LBRY is in Open Beta, it's still beta software! There will be bugs and issues to be worked out, thanks for your patience!",
|
description:
|
||||||
"color": 7976557,
|
"Even though LBRY is in Open Beta, it's still beta software! There will be bugs and issues to be worked out, thanks for your patience!",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Open Beta",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "Open Beta",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.github = {
|
exports.github = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Lbry Github',
|
description: "Lbry Github",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "The official github for LBRY is [github.com/lbryio](https://github.com/lbryio)",
|
description:
|
||||||
"color": 7976557,
|
"The official github for LBRY is [github.com/lbryio](https://github.com/lbryio)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "GitHub",
|
author: {
|
||||||
"url": "https://github.com/lbryio",
|
name: "GitHub",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://github.com/lbryio",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.daemondownload = {
|
exports.daemondownload = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'LBRY Daemon Installers',
|
description: "LBRY Daemon Installers",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Installers for the LBRY Daemon are available for download [**HERE**](https://github.com/lbryio/lbry/releases) ",
|
description:
|
||||||
"color": 7976557,
|
"Installers for the LBRY Daemon are available for download [**HERE**](https://github.com/lbryio/lbry/releases) ",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Daemon Download",
|
author: {
|
||||||
"url": "https://github.com/lbryio/lbry/releases",
|
name: "Daemon Download",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://github.com/lbryio/lbry/releases",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.directories = {
|
exports.directories = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Lbry-app Directories',
|
description: "Lbry-app Directories",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "You can find details about the folders your LBRY files are stored in at [lbry.io/faq/lbry-directories](https://lbry.io/faq/lbry-directories)",
|
description:
|
||||||
"color": 7976557,
|
"You can find details about the folders your LBRY files are stored in at [lbry.io/faq/lbry-directories](https://lbry.io/faq/lbry-directories)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Directories",
|
author: {
|
||||||
"url": "https://lbry.io/faq/lbry-directories",
|
name: "Directories",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/lbry-directories",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.faq = {
|
exports.faq = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'LBRY F.A.Q.',
|
description: "LBRY F.A.Q.",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "These questions and many more have been answered on the [F.A.Q Page](https://lbry.io/faq/)",
|
description:
|
||||||
"color": 7976557,
|
"These questions and many more have been answered on the [F.A.Q Page](https://lbry.io/faq/)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "F.A.Q",
|
author: {
|
||||||
"url": "https://lbry.io/faq/",
|
name: "F.A.Q",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.name = {
|
exports.name = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Change Name Message',
|
description: "Change Name Message",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Hey, glad to see you love LBRY so much, but for the safety of our users we ask that you avoid using discord names that include the word lbry. This is to prevent impersonation and scams.",
|
description:
|
||||||
"color": 7976557,
|
"Hey, glad to see you love LBRY so much, but for the safety of our users we ask that you avoid using discord names that include the word lbry. This is to prevent impersonation and scams.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Discord Username",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "Discord Username",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.mining = {
|
exports.mining = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Mining LBRY Credits (LBC)',
|
description: "Mining LBRY Credits (LBC)",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
var message = "We have a dedicated channel for mining discussion, feel free to join <#" + miningChannel + ">"
|
var message =
|
||||||
msg.channel.send( message );
|
"We have a dedicated channel for mining discussion, feel free to join <#" +
|
||||||
|
miningChannel +
|
||||||
|
">";
|
||||||
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.pricestance = {
|
exports.pricestance = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Our Stance on LBC Price',
|
description: "Our Stance on LBC Price",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Details about our stance on price can be found here: [lbry.io/news/acryptypical](https://lbry.io/news/acryptypical)",
|
description:
|
||||||
"color": 7976557,
|
"Details about our stance on price can be found here: [lbry.io/news/acryptypical](https://lbry.io/news/acryptypical)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "CEO's Stance on Price",
|
author: {
|
||||||
"url": "https://lbry.io/news/acryptypical",
|
name: "CEO's Stance on Price",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/news/acryptypical",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.publisher = {
|
exports.publisher = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Interested in publishing on LBRY?',
|
description: "Interested in publishing on LBRY?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Interested in publishing on LBRY? Have a look at [lbry.io/publish](https://lbry.io/publish)",
|
description:
|
||||||
"color": 7976557,
|
"Interested in publishing on LBRY? Have a look at [lbry.io/publish](https://lbry.io/publish)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Want to Publish?",
|
author: {
|
||||||
"url": "https://lbry.io/publish",
|
name: "Want to Publish?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/publish",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.publish = {
|
exports.publish = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How To Publish on LBRY?',
|
description: "How To Publish on LBRY?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "We've created a small guide to help with the Publishing features of LBRY, check it out here: [lbry.io/faq/how-to-publish](https://lbry.io/faq/how-to-publish)",
|
description:
|
||||||
"color": 7976557,
|
"We've created a small guide to help with the Publishing features of LBRY, check it out here: [lbry.io/faq/how-to-publish](https://lbry.io/faq/how-to-publish)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How to Publish",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-publish",
|
name: "How to Publish",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-publish",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.random = {
|
exports.random = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Off-Topic Message',
|
description: "Off-Topic Message",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
var message = "Please keep conversation on topic, or move random conversations to #" + randomChannel + " if you wish to continue"
|
var message =
|
||||||
msg.channel.send( message );
|
"Please keep conversation on topic, or move random conversations to #" +
|
||||||
|
randomChannel +
|
||||||
|
" if you wish to continue";
|
||||||
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.referrals = {
|
exports.referrals = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'What are Referrals?',
|
description: "What are Referrals?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see [lbry.io/faq/referrals](https://lbry.io/faq/referrals) - referral redemptions are currently in test mode and limited to one. But you can see your entire referral history in your LBRY app.",
|
description:
|
||||||
"color": 7976557,
|
"Please see [lbry.io/faq/referrals](https://lbry.io/faq/referrals) - referral redemptions are currently in test mode and limited to one. But you can see your entire referral history in your LBRY app.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Referals",
|
author: {
|
||||||
"url": "https://lbry.io/faq/referrals",
|
name: "Referals",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/referrals",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.rewards = {
|
exports.rewards = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'What are Rewards?',
|
description: "What are Rewards?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Rewards are given to legitimate users who are using the system (and in turn are testing things for us). In order to redeem rewards, you may need to verify your identity through a Credit Card or other manual methods.\n Please see [lbry.io/faq/identity-requirements](https://lbry.io/faq/identity-requirements)",
|
description:
|
||||||
"color": 7976557,
|
"Rewards are given to legitimate users who are using the system (and in turn are testing things for us). In order to redeem rewards, you may need to verify your identity through a Credit Card or other manual methods.\n Please see [lbry.io/faq/identity-requirements](https://lbry.io/faq/identity-requirements)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Rewards",
|
author: {
|
||||||
"url": "https://lbry.io/faq/identity-requirements",
|
name: "Rewards",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/identity-requirements",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.rewardsvsreferrals = {
|
exports.rewardsvsreferrals = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'What the Difference Between Rewards & Referrals?',
|
description: "What the Difference Between Rewards & Referrals?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Rewards are different to referral bonuses. Rewards are given for testing the LBRY software and system. Referrals are given for sharing LBRY with the masses.",
|
description:
|
||||||
"color": 7976557,
|
"Rewards are different to referral bonuses. Rewards are given for testing the LBRY software and system. Referrals are given for sharing LBRY with the masses.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Rewards Vs. Referrals",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "Rewards Vs. Referrals",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.cc = {
|
exports.cc = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Credit Card Verification?',
|
description: "Credit Card Verification?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
var message = "In an effort to limit abuse, newly invited LBRY users will be required to verify their identity via a Credit Card or by a manual verification process in order to be eligible for Rewards. Prepaid or Virtual credit cards are disallowed. Certain countries (where we've previously seen abuse) are being denied, but that list may expand later on. If you use Tor/Proxy/VPN, you also may be denied. If credit card verification does not work for you, please go to the <#" + verificationChannel + "> channel for assistance.\n**Verification is purely optional and ONLY relevant for Rewards, the app can be used without providing CC information**\n**Please See:https://lbry.io/faq/identity-requirements**"
|
var message =
|
||||||
msg.channel.send( message );
|
"In an effort to limit abuse, newly invited LBRY users will be required to verify their identity via a Credit Card or by a manual verification process in order to be eligible for Rewards. Prepaid or Virtual credit cards are disallowed. Certain countries (where we've previously seen abuse) are being denied, but that list may expand later on. If you use Tor/Proxy/VPN, you also may be denied. If credit card verification does not work for you, please go to the <#" +
|
||||||
|
verificationChannel +
|
||||||
|
"> channel for assistance.\n**Verification is purely optional and ONLY relevant for Rewards, the app can be used without providing CC information**\n**Please See:https://lbry.io/faq/identity-requirements**";
|
||||||
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.verify = {
|
exports.verify = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to Verify?',
|
description: "How to Verify?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please download the latest version from [HERE](https://lbry.io/get) Upon install, you'll be greeted with a welcome message. If you already had the App installed, then go to the wallet (bank icon in the top right) > Rewards - this should show your current status. New users will need to verify in order to access rewards. Type !cc or !verification for more information.",
|
description:
|
||||||
"color": 7976557,
|
"Please download the latest version from [HERE](https://lbry.io/get) Upon install, you'll be greeted with a welcome message. If you already had the App installed, then go to the wallet (bank icon in the top right) > Rewards - this should show your current status. New users will need to verify in order to access rewards. Type !cc or !verification for more information.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How To Verify?",
|
author: {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
name: "How To Verify?",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.verification = {
|
exports.verification = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Verification Help Message',
|
description: "Verification Help Message",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
var message = "If you would like to be verified go to <#" + verificationChannel + ">. After joining, post that you would like verification and a mod will get to your request as soon as possible. We appreciate your patience. Only one account per person is allowed access to LBRY Rewards. This channel is not for YouTube sync, which is a separate process that requires a minimum number of views on Youtube (If you restarted LBRY and didn't get verified, you most likely don't qualify)."
|
var message =
|
||||||
msg.channel.send( message );
|
"If you would like to be verified go to <#" +
|
||||||
|
verificationChannel +
|
||||||
|
">. After joining, post that you would like verification and a mod will get to your request as soon as possible. We appreciate your patience. Only one account per person is allowed access to LBRY Rewards. This channel is not for YouTube sync, which is a separate process that requires a minimum number of views on Youtube (If you restarted LBRY and didn't get verified, you most likely don't qualify).";
|
||||||
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.logfile = {
|
exports.logfile = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to fine LBRY-app Log File?',
|
description: "How to fine LBRY-app Log File?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "You can find your log files by following the tutorial [HERE](https://lbry.io/faq/how-to-find-lbry-log-file)",
|
description:
|
||||||
"color": 7976557,
|
"You can find your log files by following the tutorial [HERE](https://lbry.io/faq/how-to-find-lbry-log-file)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How to find my LogFile?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-find-lbry-log-file",
|
name: "How to find my LogFile?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-find-lbry-log-file",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.backup = {
|
exports.backup = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to Backup the Wallet',
|
description: "How to Backup the Wallet",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see this guide on how to backup your wallet: [lbry.io/faq/how-to-backup-wallet](https://lbry.io/faq/how-to-backup-wallet)",
|
description:
|
||||||
"color": 7976557,
|
"Please see this guide on how to backup your wallet: [lbry.io/faq/how-to-backup-wallet](https://lbry.io/faq/how-to-backup-wallet)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How to Backup my Wallet?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-backup-wallet",
|
name: "How to Backup my Wallet?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-backup-wallet",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.startupissues = {
|
exports.startupissues = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Startup Troubleshooting?',
|
description: "Startup Troubleshooting?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see [lbry.io/faq/startup-troubleshooting](https://lbry.io/faq/startup-troubleshooting) if you are having trouble getting LBRY to start correctly.",
|
description:
|
||||||
"color": 7976557,
|
"Please see [lbry.io/faq/startup-troubleshooting](https://lbry.io/faq/startup-troubleshooting) if you are having trouble getting LBRY to start correctly.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Startup Troubleshooting",
|
author: {
|
||||||
"url": "https://lbry.io/faq/startup-troubleshooting",
|
name: "Startup Troubleshooting",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/startup-troubleshooting",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.streamingissues = {
|
exports.streamingissues = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Unable To Stream?',
|
description: "Unable To Stream?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see [lbry.io/faq/unable-to-stream](https://lbry.io/faq/unable-to-stream) if you are experiencing problems viewing **ANY** LBRY content.",
|
description:
|
||||||
"color": 7976557,
|
"Please see [lbry.io/faq/unable-to-stream](https://lbry.io/faq/unable-to-stream) if you are experiencing problems viewing **ANY** LBRY content.",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Streaming Troubleshooting",
|
author: {
|
||||||
"url": "https://lbry.io/faq/unable-to-stream",
|
name: "Streaming Troubleshooting",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/unable-to-stream",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.ports = {
|
exports.ports = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'LBRY Ports',
|
description: "LBRY Ports",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "The daemon uses ports **3333** and **4444**. May interfere with mining software. Start miner after the app and you should be okay. Also these ports need to be port forwarded on your router. Google is your friend there. \n **Please see this tutorial on how to change ports : [lbry.io/faq/how-to-change-port](https://lbry.io/faq/how-to-change-port)**",
|
description:
|
||||||
"color": 7976557,
|
"The daemon uses ports **3333** and **4444**. May interfere with mining software. Start miner after the app and you should be okay. Also these ports need to be port forwarded on your router. Google is your friend there. \n **Please see this tutorial on how to change ports : [lbry.io/faq/how-to-change-port](https://lbry.io/faq/how-to-change-port)**",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Ports",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-change-port",
|
name: "Ports",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-change-port",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.migrate = {
|
exports.migrate = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to Migrate your Wallet/Data',
|
description: "How to Migrate your Wallet/Data",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see [lbry.io/faq/backup-data](https://lbry.io/faq/backup-data) for instructions on how to backup and/or migrate your LBRY data",
|
description:
|
||||||
"color": 7976557,
|
"Please see [lbry.io/faq/backup-data](https://lbry.io/faq/backup-data) for instructions on how to backup and/or migrate your LBRY data",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How To Backup/Migrate LBRY Data?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/backup-data",
|
name: "How To Backup/Migrate LBRY Data?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/backup-data",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.tipping = {
|
exports.tipping = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'Details About LBRY-app Tipping',
|
description: "Details About LBRY-app Tipping",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "Please see [lbry.io/faq/tipping](https://lbry.io/faq/tipping) for details about tipping in the LBRY-App",
|
description:
|
||||||
"color": 7976557,
|
"Please see [lbry.io/faq/tipping](https://lbry.io/faq/tipping) for details about tipping in the LBRY-App",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "LBRY-App Tipping?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/tipping",
|
name: "LBRY-App Tipping?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/tipping",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.email = {
|
exports.email = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to change Email in LBRY-app?',
|
description: "How to change Email in LBRY-app?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "If you need to change your LBRY connected email, please see instructions [HERE](https://lbry.io/faq/how-to-change-email)",
|
description:
|
||||||
"color": 7976557,
|
"If you need to change your LBRY connected email, please see instructions [HERE](https://lbry.io/faq/how-to-change-email)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "LBRY-App Change connected E-mail?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-change-email",
|
name: "LBRY-App Change connected E-mail?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-change-email",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.cli = {
|
exports.cli = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How to interact with LBRY CLI?',
|
description: "How to interact with LBRY CLI?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "If you are interested in interacting with the LBRY protocol via commands, check out [lbry.io/faq/how-to-cli](https://lbry.io/faq/how-to-cli)",
|
description:
|
||||||
"color": 7976557,
|
"If you are interested in interacting with the LBRY protocol via commands, check out [lbry.io/faq/how-to-cli](https://lbry.io/faq/how-to-cli)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "Interact with the LBRY CLI",
|
author: {
|
||||||
"url": "https://lbry.io/faq/how-to-cli",
|
name: "Interact with the LBRY CLI",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/how-to-cli",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.ipfstorrent = {
|
exports.ipfstorrent = {
|
||||||
usage: " ",
|
usage: " ",
|
||||||
description: 'How is LBRY different from IPFS / BitTorrent?',
|
description: "How is LBRY different from IPFS / BitTorrent?",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": "If you are interested in how LBRY is different from IPFS or BitTorrent, check out [lbry.io/faq/different-ipfs](https://lbry.io/faq/different-ipfs)",
|
description:
|
||||||
"color": 7976557,
|
"If you are interested in how LBRY is different from IPFS or BitTorrent, check out [lbry.io/faq/different-ipfs](https://lbry.io/faq/different-ipfs)",
|
||||||
"author": {
|
color: 7976557,
|
||||||
"name": "How is LBRY different from IPFS / BitTorrent?",
|
author: {
|
||||||
"url": "https://lbry.io/faq/different-ipfs",
|
name: "How is LBRY different from IPFS / BitTorrent?",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
url: "https://lbry.io/faq/different-ipfs",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
let needle = require('needle');
|
let needle = require("needle");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let hasHashBotChannels = require('../helpers.js').hasHashBotChannels;
|
let hasHashBotChannels = require("../helpers.js").hasHashBotChannels;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let ChannelID = config.get('hashbot').mainchannel;
|
let ChannelID = config.get("hashbot").mainchannel;
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"hash" // command that is in this file, every command needs it own export as shown below
|
"hash" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
];
|
||||||
|
|
||||||
exports.custom = [
|
exports.custom = ["timedhash"];
|
||||||
"timedhash"
|
|
||||||
]
|
|
||||||
|
|
||||||
exports.timedhash = function(bot) {
|
exports.timedhash = function(bot) {
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
|
@ -17,74 +15,107 @@ exports.timedhash = function(bot) {
|
||||||
}, 6 * 60 * 60 * 1000);
|
}, 6 * 60 * 60 * 1000);
|
||||||
|
|
||||||
function sendMiningInfo(bot) {
|
function sendMiningInfo(bot) {
|
||||||
needle.get('https://explorer.lbry.io/api/v1/status', function(error, response) {
|
needle.get("https://explorer.lbry.io/api/v1/status", function(
|
||||||
|
error,
|
||||||
|
response
|
||||||
|
) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
bot.channels.get(ChannelID).send('Explorer API is not available');
|
bot.channels.get(ChannelID).send("Explorer API is not available");
|
||||||
} else {
|
} else {
|
||||||
var data, hashrate = "", difficulty = "", height = "";
|
var data,
|
||||||
|
hashrate = "",
|
||||||
|
difficulty = "",
|
||||||
|
height = "";
|
||||||
data = response.body;
|
data = response.body;
|
||||||
height += data.status.height;
|
height += data.status.height;
|
||||||
hashrate += data.status.hashrate;
|
hashrate += data.status.hashrate;
|
||||||
difficulty += data.status.difficulty;
|
difficulty += data.status.difficulty;
|
||||||
description = "Hashrate: "+hashrate+"\n"+"Difficulty: "+difficulty+"\n"+"Current block: "+height+"\n"+"Source: https://explorer.lbry.io";
|
description =
|
||||||
|
"Hashrate: " +
|
||||||
|
hashrate +
|
||||||
|
"\n" +
|
||||||
|
"Difficulty: " +
|
||||||
|
difficulty +
|
||||||
|
"\n" +
|
||||||
|
"Current block: " +
|
||||||
|
height +
|
||||||
|
"\n" +
|
||||||
|
"Source: https://explorer.lbry.io";
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": description,
|
description: description,
|
||||||
"color": 7976557,
|
color: 7976557,
|
||||||
"author": {
|
author: {
|
||||||
"name": "LBRY Explorer Stats",
|
name: "LBRY Explorer Stats",
|
||||||
"url": "https://explorer.lbry.io",
|
url: "https://explorer.lbry.io",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bot.channels.get(ChannelID).send({ embed });
|
bot.channels.get(ChannelID).send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
exports.hash = {
|
exports.hash = {
|
||||||
usage: "",
|
usage: "",
|
||||||
description: 'Displays current Hashrate of Network',
|
description: "Displays current Hashrate of Network",
|
||||||
process: function(bot,msg){
|
process: function(bot, msg) {
|
||||||
var command = '!hash';
|
var command = "!hash";
|
||||||
sendMiningInfo(bot, msg);
|
sendMiningInfo(bot, msg);
|
||||||
|
|
||||||
|
function sendMiningInfo(bot, msg) {
|
||||||
function sendMiningInfo(bot, msg) {
|
if (!inPrivate(msg) && !hasHashBotChannels(msg)) {
|
||||||
if(!inPrivate(msg) && !hasHashBotChannels(msg)){
|
msg.channel.send(
|
||||||
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to hash bot.');
|
"Please use <#" + ChannelID + "> or DMs to talk to hash bot."
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
needle.get('https://explorer.lbry.io/api/v1/status', function(error, response) {
|
needle.get("https://explorer.lbry.io/api/v1/status", function(
|
||||||
|
error,
|
||||||
|
response
|
||||||
|
) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
msg.channel.send('Explorer API is not available');
|
msg.channel.send("Explorer API is not available");
|
||||||
}
|
} else {
|
||||||
else {
|
var data,
|
||||||
var data, hashrate = "", difficulty = "", height = "";
|
hashrate = "",
|
||||||
|
difficulty = "",
|
||||||
|
height = "";
|
||||||
data = response.body;
|
data = response.body;
|
||||||
height += data.status.height;
|
height += data.status.height;
|
||||||
hashrate += data.status.hashrate;
|
hashrate += data.status.hashrate;
|
||||||
difficulty += data.status.difficulty;
|
difficulty += data.status.difficulty;
|
||||||
description = "Hashrate: "+hashrate+"\n"+"Difficulty: "+difficulty+"\n"+"Current block: "+height+"\n"+"Source: https://explorer.lbry.io";
|
description =
|
||||||
|
"Hashrate: " +
|
||||||
|
hashrate +
|
||||||
|
"\n" +
|
||||||
|
"Difficulty: " +
|
||||||
|
difficulty +
|
||||||
|
"\n" +
|
||||||
|
"Current block: " +
|
||||||
|
height +
|
||||||
|
"\n" +
|
||||||
|
"Source: https://explorer.lbry.io";
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": description,
|
description: description,
|
||||||
"color": 7976557,
|
color: 7976557,
|
||||||
"author": {
|
author: {
|
||||||
"name": "LBRY Explorer Stats",
|
name: "LBRY Explorer Stats",
|
||||||
"url": "https://explorer.lbry.io",
|
url: "https://explorer.lbry.io",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
msg.channel.send({
|
||||||
|
embed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
function numberWithCommas(x) {
|
|
||||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
function numberWithCommas(x) {
|
||||||
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -1,137 +1,338 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
let jp = require('jsonpath');
|
let jp = require("jsonpath");
|
||||||
let moment = require('moment');
|
let moment = require("moment");
|
||||||
let numeral = require('numeral');
|
let numeral = require("numeral");
|
||||||
let request = require('request');
|
let request = require("request");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let hasPriceBotChannels = require('../helpers.js').hasPriceBotChannels;
|
let hasPriceBotChannels = require("../helpers.js").hasPriceBotChannels;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let ChannelID = config.get('pricebot').mainchannel;
|
let ChannelID = config.get("pricebot").mainchannel;
|
||||||
|
|
||||||
|
exports.commands = ["price"];
|
||||||
exports.commands = [
|
|
||||||
"price"
|
|
||||||
]
|
|
||||||
|
|
||||||
exports.price = {
|
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 = {
|
var 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
|
||||||
currencies: {
|
currencies: {
|
||||||
USD: { steps: ['LBCBTC', 'BTCUSD'], format: '$0,0.00', sign: 'USD ' },
|
USD: {
|
||||||
GBP: { steps: ['LBCBTC', 'BTCGBP'], format: '£0,0.00', sign: '£' },
|
steps: ["LBCBTC", "BTCUSD"],
|
||||||
AUD: { steps: ['LBCBTC', 'BTCAUD'], format: '$0,0.00', sign: 'AUD ' },
|
format: "$0,0.00",
|
||||||
BRL: { steps: ['LBCBTC', 'BTCBRL'], format: 'R$0,0.00', sign: 'R$' },
|
sign: "USD "
|
||||||
CAD: { steps: ['LBCBTC', 'BTCCAD'], format: '$0,0.00', sign: 'CAD ' },
|
},
|
||||||
CHF: { steps: ['LBCBTC', 'BTCCHF'], format: 'CHF 0,0.00', sign: 'CHF' },
|
GBP: {
|
||||||
CLP: { steps: ['LBCBTC', 'BTCCLP'], format: '$0,0.00', sign: 'CLP ' },
|
steps: ["LBCBTC", "BTCGBP"],
|
||||||
CNY: { steps: ['LBCBTC', 'BTCCNY'], format: '¥0,0.00', sign: '¥' },
|
format: "£0,0.00",
|
||||||
DKK: { steps: ['LBCBTC', 'BTCDKK'], format: 'kr 0,0.00', sign: 'kr' },
|
sign: "£"
|
||||||
EUR: { steps: ['LBCBTC', 'BTCEUR'], format: '€0,0.00', sign: '€' },
|
},
|
||||||
HKD: { steps: ['LBCBTC', 'BTCHKD'], format: '$0,0.00', sign: 'HKD ' },
|
AUD: {
|
||||||
INR: { steps: ['LBCBTC', 'BTCINR'], format: '₹0,0.00', sign: '₹' },
|
steps: ["LBCBTC", "BTCAUD"],
|
||||||
ISK: { steps: ['LBCBTC', 'BTCISK'], format: 'kr 0,0.00', sign: 'kr' },
|
format: "$0,0.00",
|
||||||
JPY: { steps: ['LBCBTC', 'BTCJPY'], format: '¥0,0.00', sign: '¥' },
|
sign: "AUD "
|
||||||
KRW: { steps: ['LBCBTC', 'BTCKRW'], format: '₩0,0.00', sign: '₩' },
|
},
|
||||||
NZD: { steps: ['LBCBTC', 'BTCNZD'], format: '$0,0.00', sign: 'NZD ' },
|
BRL: {
|
||||||
PLN: { steps: ['LBCBTC', 'BTCPLN'], format: 'zł 0,0.00', sign: 'zł' },
|
steps: ["LBCBTC", "BTCBRL"],
|
||||||
RUB: { steps: ['LBCBTC', 'BTCRUB'], format: 'RUB 0,0.00', sign: 'RUB' },
|
format: "R$0,0.00",
|
||||||
SEK: { steps: ['LBCBTC', 'BTCSEK'], format: 'kr 0,0.00', sign: 'kr' },
|
sign: "R$"
|
||||||
SGD: { steps: ['LBCBTC', 'BTCSGD'], format: '$0,0.00', sign: 'SGD ' },
|
},
|
||||||
THB: { steps: ['LBCBTC', 'BTCTHB'], format: '฿0,0.00', sign: '฿' },
|
CAD: {
|
||||||
TWD: { steps: ['LBCBTC', 'BTCTWD'], format: 'NT$0,0.00', sign: 'NT$' },
|
steps: ["LBCBTC", "BTCCAD"],
|
||||||
IDR: { steps: ['LBCBTC', 'BTCIDR'], format: 'Rp0,0.00', sign: 'Rp' },
|
format: "$0,0.00",
|
||||||
BTC: { steps: ['LBCBTC'], format: '0,0[.][00000000] BTC', sign: 'BTC' }
|
sign: "CAD "
|
||||||
|
},
|
||||||
|
CHF: {
|
||||||
|
steps: ["LBCBTC", "BTCCHF"],
|
||||||
|
format: "CHF 0,0.00",
|
||||||
|
sign: "CHF"
|
||||||
|
},
|
||||||
|
CLP: {
|
||||||
|
steps: ["LBCBTC", "BTCCLP"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "CLP "
|
||||||
|
},
|
||||||
|
CNY: {
|
||||||
|
steps: ["LBCBTC", "BTCCNY"],
|
||||||
|
format: "¥0,0.00",
|
||||||
|
sign: "¥"
|
||||||
|
},
|
||||||
|
DKK: {
|
||||||
|
steps: ["LBCBTC", "BTCDKK"],
|
||||||
|
format: "kr 0,0.00",
|
||||||
|
sign: "kr"
|
||||||
|
},
|
||||||
|
EUR: {
|
||||||
|
steps: ["LBCBTC", "BTCEUR"],
|
||||||
|
format: "€0,0.00",
|
||||||
|
sign: "€"
|
||||||
|
},
|
||||||
|
HKD: {
|
||||||
|
steps: ["LBCBTC", "BTCHKD"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "HKD "
|
||||||
|
},
|
||||||
|
INR: {
|
||||||
|
steps: ["LBCBTC", "BTCINR"],
|
||||||
|
format: "₹0,0.00",
|
||||||
|
sign: "₹"
|
||||||
|
},
|
||||||
|
ISK: {
|
||||||
|
steps: ["LBCBTC", "BTCISK"],
|
||||||
|
format: "kr 0,0.00",
|
||||||
|
sign: "kr"
|
||||||
|
},
|
||||||
|
JPY: {
|
||||||
|
steps: ["LBCBTC", "BTCJPY"],
|
||||||
|
format: "¥0,0.00",
|
||||||
|
sign: "¥"
|
||||||
|
},
|
||||||
|
KRW: {
|
||||||
|
steps: ["LBCBTC", "BTCKRW"],
|
||||||
|
format: "₩0,0.00",
|
||||||
|
sign: "₩"
|
||||||
|
},
|
||||||
|
NZD: {
|
||||||
|
steps: ["LBCBTC", "BTCNZD"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "NZD "
|
||||||
|
},
|
||||||
|
PLN: {
|
||||||
|
steps: ["LBCBTC", "BTCPLN"],
|
||||||
|
format: "zł 0,0.00",
|
||||||
|
sign: "zł"
|
||||||
|
},
|
||||||
|
RUB: {
|
||||||
|
steps: ["LBCBTC", "BTCRUB"],
|
||||||
|
format: "RUB 0,0.00",
|
||||||
|
sign: "RUB"
|
||||||
|
},
|
||||||
|
SEK: {
|
||||||
|
steps: ["LBCBTC", "BTCSEK"],
|
||||||
|
format: "kr 0,0.00",
|
||||||
|
sign: "kr"
|
||||||
|
},
|
||||||
|
SGD: {
|
||||||
|
steps: ["LBCBTC", "BTCSGD"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "SGD "
|
||||||
|
},
|
||||||
|
THB: {
|
||||||
|
steps: ["LBCBTC", "BTCTHB"],
|
||||||
|
format: "฿0,0.00",
|
||||||
|
sign: "฿"
|
||||||
|
},
|
||||||
|
TWD: {
|
||||||
|
steps: ["LBCBTC", "BTCTWD"],
|
||||||
|
format: "NT$0,0.00",
|
||||||
|
sign: "NT$"
|
||||||
|
},
|
||||||
|
IDR: {
|
||||||
|
steps: ["LBCBTC", "BTCIDR"],
|
||||||
|
format: "Rp0,0.00",
|
||||||
|
sign: "Rp"
|
||||||
|
},
|
||||||
|
BTC: {
|
||||||
|
steps: ["LBCBTC"],
|
||||||
|
format: "0,0[.][00000000] BTC",
|
||||||
|
sign: "BTC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// api steps
|
// api steps
|
||||||
api: {
|
api: {
|
||||||
LBCBTC: { url: 'https://bittrex.com/api/v1.1/public/getticker?market=BTC-LBC', path: '$.result.Bid' },
|
LBCBTC: {
|
||||||
BTCUSD: { url: 'https://blockchain.info/ticker', path: '$.USD.buy' },
|
url: "https://bittrex.com/api/v1.1/public/getticker?market=BTC-LBC",
|
||||||
BTCGBP: { url: 'https://blockchain.info/ticker', path: '$.GBP.buy' },
|
path: "$.result.Bid"
|
||||||
BTCAUD: { url: 'https://blockchain.info/ticker', path: '$.AUD.buy' },
|
},
|
||||||
BTCBRL: { url: 'https://blockchain.info/ticker', path: '$.BRL.buy' },
|
BTCUSD: {
|
||||||
BTCCAD: { url: 'https://blockchain.info/ticker', path: '$.CAD.buy' },
|
url: "https://blockchain.info/ticker",
|
||||||
BTCCHF: { url: 'https://blockchain.info/ticker', path: '$.CHF.buy' },
|
path: "$.USD.buy"
|
||||||
BTCCLP: { url: 'https://blockchain.info/ticker', path: '$.CLP.buy' },
|
},
|
||||||
BTCCNY: { url: 'https://blockchain.info/ticker', path: '$.CNY.buy' },
|
BTCGBP: {
|
||||||
BTCDKK: { url: 'https://blockchain.info/ticker', path: '$.DKK.buy' },
|
url: "https://blockchain.info/ticker",
|
||||||
BTCEUR: { url: 'https://blockchain.info/ticker', path: '$.EUR.buy' },
|
path: "$.GBP.buy"
|
||||||
BTCHKD: { url: 'https://blockchain.info/ticker', path: '$.HKD.buy' },
|
},
|
||||||
BTCINR: { url: 'https://blockchain.info/ticker', path: '$.INR.buy' },
|
BTCAUD: {
|
||||||
BTCISK: { url: 'https://blockchain.info/ticker', path: '$.ISK.buy' },
|
url: "https://blockchain.info/ticker",
|
||||||
BTCJPY: { url: 'https://blockchain.info/ticker', path: '$.JPY.buy' },
|
path: "$.AUD.buy"
|
||||||
BTCKRW: { url: 'https://blockchain.info/ticker', path: '$.KRW.buy' },
|
},
|
||||||
BTCNZD: { url: 'https://blockchain.info/ticker', path: '$.NZD.buy' },
|
BTCBRL: {
|
||||||
BTCPLN: { url: 'https://blockchain.info/ticker', path: '$.PLN.buy' },
|
url: "https://blockchain.info/ticker",
|
||||||
BTCRUB: { url: 'https://blockchain.info/ticker', path: '$.RUB.buy' },
|
path: "$.BRL.buy"
|
||||||
BTCSEK: { url: 'https://blockchain.info/ticker', path: '$.SEK.buy' },
|
},
|
||||||
BTCSGD: { url: 'https://blockchain.info/ticker', path: '$.SGD.buy' },
|
BTCCAD: {
|
||||||
BTCTHB: { url: 'https://blockchain.info/ticker', path: '$.THB.buy' },
|
url: "https://blockchain.info/ticker",
|
||||||
BTCTWD: { url: 'https://blockchain.info/ticker', path: '$.TWD.buy' },
|
path: "$.CAD.buy"
|
||||||
BTCIDR: { url: 'https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=IDR', path: '$.IDR'}
|
},
|
||||||
|
BTCCHF: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.CHF.buy"
|
||||||
|
},
|
||||||
|
BTCCLP: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.CLP.buy"
|
||||||
|
},
|
||||||
|
BTCCNY: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.CNY.buy"
|
||||||
|
},
|
||||||
|
BTCDKK: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.DKK.buy"
|
||||||
|
},
|
||||||
|
BTCEUR: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.EUR.buy"
|
||||||
|
},
|
||||||
|
BTCHKD: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.HKD.buy"
|
||||||
|
},
|
||||||
|
BTCINR: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.INR.buy"
|
||||||
|
},
|
||||||
|
BTCISK: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.ISK.buy"
|
||||||
|
},
|
||||||
|
BTCJPY: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.JPY.buy"
|
||||||
|
},
|
||||||
|
BTCKRW: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.KRW.buy"
|
||||||
|
},
|
||||||
|
BTCNZD: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.NZD.buy"
|
||||||
|
},
|
||||||
|
BTCPLN: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.PLN.buy"
|
||||||
|
},
|
||||||
|
BTCRUB: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.RUB.buy"
|
||||||
|
},
|
||||||
|
BTCSEK: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.SEK.buy"
|
||||||
|
},
|
||||||
|
BTCSGD: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.SGD.buy"
|
||||||
|
},
|
||||||
|
BTCTHB: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.THB.buy"
|
||||||
|
},
|
||||||
|
BTCTWD: {
|
||||||
|
url: "https://blockchain.info/ticker",
|
||||||
|
path: "$.TWD.buy"
|
||||||
|
},
|
||||||
|
BTCIDR: {
|
||||||
|
url:
|
||||||
|
"https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=IDR",
|
||||||
|
path: "$.IDR"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// display date/time format
|
// display date/time format
|
||||||
dtFormat: 'Do MMM YYYY h:mma [UTC]',
|
dtFormat: "Do MMM YYYY h:mma [UTC]",
|
||||||
|
|
||||||
// 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.trim().split(' ').filter( function(n){return n !== "";} );
|
var words = suffix
|
||||||
|
.trim()
|
||||||
|
.split(" ")
|
||||||
|
.filter(function(n) {
|
||||||
|
return n !== "";
|
||||||
|
});
|
||||||
|
|
||||||
var currency = (words.length > 0) ? words[0].toUpperCase() : options.defaultCurrency;
|
var currency =
|
||||||
var amount = (words.length > 1) ? parseFloat(words[1], 10) : 1;
|
words.length > 0 ? words[0].toUpperCase() : options.defaultCurrency;
|
||||||
var showHelp = (isNaN(amount)) || (Object.keys(options.currencies).indexOf(currency) === -1);
|
var amount = words.length > 1 ? parseFloat(words[1], 10) : 1;
|
||||||
// store the last retrieved rate
|
var showHelp =
|
||||||
var cachedRates = {};
|
isNaN(amount) || Object.keys(options.currencies).indexOf(currency) === -1;
|
||||||
var command = "!price"
|
// store the last retrieved rate
|
||||||
|
var cachedRates = {};
|
||||||
|
var command = "!price";
|
||||||
|
|
||||||
var currencies = Object.keys(options.currencies);
|
var currencies = Object.keys(options.currencies);
|
||||||
for (var i = 0; i < currencies.length; i++) {
|
for (var i = 0; i < currencies.length; i++) {
|
||||||
cachedRates[currencies[i]] = { rate: 0, time: null };
|
cachedRates[currencies[i]] = {
|
||||||
|
rate: 0,
|
||||||
|
time: null
|
||||||
|
};
|
||||||
}
|
}
|
||||||
if (showHelp) {
|
if (showHelp) {
|
||||||
doHelp(bot,msg,suffix);
|
doHelp(bot, msg, suffix);
|
||||||
} else {
|
} else {
|
||||||
if(!hasPriceBotChannels(msg) && !inPrivate(msg)){
|
if (!hasPriceBotChannels(msg) && !inPrivate(msg)) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
doSteps(bot, currency, amount);
|
doSteps(bot, currency, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doHelp(bot,msg,suffix) {
|
function doHelp(bot, msg, suffix) {
|
||||||
if(!hasPriceBotChannels(msg) && !inPrivate(msg)){
|
if (!hasPriceBotChannels(msg) && !inPrivate(msg)) {
|
||||||
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 =
|
var message =
|
||||||
'**' + command + '**: show the price of 1 LBC in ' + options.defaultCurrency + '\n' +
|
"**" +
|
||||||
'**' + command + ' help**: this message\n' +
|
command +
|
||||||
'**' + command + ' CURRENCY**: show the price of 1 LBC in CURRENCY. Supported values for CURRENCY are Listed Below\n' +
|
"**: show the price of 1 LBC in " +
|
||||||
'**' + command + ' CURRENCY AMOUNT**: show the price of AMOUNT LBC in CURRENCY\n' +
|
options.defaultCurrency +
|
||||||
'**Supported Currencies:** *usd*, *gbp*, *eur*, *aud*, *brl*, *cad*, *chf*, *clp*, *cny*, *dkk*, *hkd*, *inr*, *isk*, *jpy*, *krw*, *nzd*, *pln* ,*rub*, *sek*, *sgd*, *thb*, *twd*, *idr* and *btc* (case-insensitive)';
|
"\n" +
|
||||||
|
"**" +
|
||||||
|
command +
|
||||||
|
" help**: this message\n" +
|
||||||
|
"**" +
|
||||||
|
command +
|
||||||
|
" CURRENCY**: show the price of 1 LBC in CURRENCY. Supported values for CURRENCY are Listed Below\n" +
|
||||||
|
"**" +
|
||||||
|
command +
|
||||||
|
" CURRENCY AMOUNT**: show the price of AMOUNT LBC in CURRENCY\n" +
|
||||||
|
"**Supported Currencies:** *usd*, *gbp*, *eur*, *aud*, *brl*, *cad*, *chf*, *clp*, *cny*, *dkk*, *hkd*, *inr*, *isk*, *jpy*, *krw*, *nzd*, *pln* ,*rub*, *sek*, *sgd*, *thb*, *twd*, *idr* and *btc* (case-insensitive)";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMessage(amount, rate, option) {
|
function formatMessage(amount, rate, option) {
|
||||||
var cur = option.sign;
|
var cur = option.sign;
|
||||||
var value = numeral(rate.rate * amount).format(option.format);
|
var value = numeral(rate.rate * amount).format(option.format);
|
||||||
return '*' + numeral(amount).format('0,0[.][00000000]') + ' LBC = ' + cur +' ' + value + '*\n_last updated ' + rate.time.utc().format(options.dtFormat) + '_';
|
return (
|
||||||
}
|
"*" +
|
||||||
|
numeral(amount).format("0,0[.][00000000]") +
|
||||||
|
" LBC = " +
|
||||||
|
cur +
|
||||||
|
" " +
|
||||||
|
value +
|
||||||
|
"*\n_last updated " +
|
||||||
|
rate.time.utc().format(options.dtFormat) +
|
||||||
|
"_"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function doSteps(bot, currency, amount) {
|
function doSteps(bot, currency, amount) {
|
||||||
var option = options.currencies[currency];
|
var option = options.currencies[currency];
|
||||||
var shouldReload = true;
|
var shouldReload = true;
|
||||||
if (cachedRates[currency]) {
|
if (cachedRates[currency]) {
|
||||||
var cache = cachedRates[currency];
|
var 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);
|
var message = formatMessage(amount, cache, option);
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
|
@ -147,20 +348,28 @@ function doSteps(bot, currency, amount) {
|
||||||
|
|
||||||
processSteps(bot, currency, 0, amount, steps, option);
|
processSteps(bot, currency, 0, amount, steps, option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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];
|
var 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];
|
var 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;
|
var pairRate = 0;
|
||||||
|
@ -174,7 +383,7 @@ function processSteps(bot, currency, rate, amount, steps, option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pairRate > 0) {
|
if (pairRate > 0) {
|
||||||
rate = (rate === 0) ? pairRate : rate * pairRate;
|
rate = rate === 0 ? pairRate : rate * pairRate;
|
||||||
steps.shift();
|
steps.shift();
|
||||||
if (steps.length > 0) {
|
if (steps.length > 0) {
|
||||||
processSteps(bot, currency, rate, amount, steps, option);
|
processSteps(bot, currency, rate, amount, steps, option);
|
||||||
|
@ -182,15 +391,19 @@ function processSteps(bot, currency, rate, amount, steps, option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// final step, cache and then response
|
// final step, cache and then response
|
||||||
var result = { rate: rate, time: moment() };
|
var result = {
|
||||||
|
rate: rate,
|
||||||
|
time: moment()
|
||||||
|
};
|
||||||
cachedRates[currency] = result;
|
cachedRates[currency] = result;
|
||||||
msg.channel.send(formatMessage(amount, result, option));
|
msg.channel.send(formatMessage(amount, result, option));
|
||||||
} else {
|
} else {
|
||||||
msg.channel.send('The rate returned for the ' + pairName + ' pair was invalid.');
|
msg.channel.send(
|
||||||
|
"The rate returned for the " + pairName + " pair was invalid."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
|
|
@ -1,44 +1,53 @@
|
||||||
let hasPerms = require('../helpers.js').hasPerms;
|
let hasPerms = require("../helpers.js").hasPerms;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"purge" // command that is in this file, every command needs it own export as shown below
|
"purge" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
];
|
||||||
|
|
||||||
exports.purge = {
|
exports.purge = {
|
||||||
usage: "<number of messages>",
|
usage: "<number of messages>",
|
||||||
description: 'Deletes Messages',
|
description: "Deletes Messages",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
if (inPrivate(msg)) {
|
if (inPrivate(msg)) {
|
||||||
msg.channel.send("You Cant Purge Message In DM's!");
|
msg.channel.send("You Cant Purge Message In DM's!");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (hasPerms(msg)) {
|
if (hasPerms(msg)) {
|
||||||
if (!suffix) {
|
if (!suffix) {
|
||||||
var newamount = "2"
|
var newamount = "2";
|
||||||
} else {
|
} else {
|
||||||
var amount = Number(suffix)
|
var amount = Number(suffix);
|
||||||
var adding = 1
|
var adding = 1;
|
||||||
var newamount = amount + adding
|
var newamount = amount + adding;
|
||||||
}
|
}
|
||||||
let messagecount = newamount.toString();
|
let messagecount = newamount.toString();
|
||||||
msg.channel.fetchMessages({limit: messagecount})
|
msg.channel
|
||||||
|
.fetchMessages({
|
||||||
|
limit: messagecount
|
||||||
|
})
|
||||||
.then(messages => {
|
.then(messages => {
|
||||||
msg.channel.bulkDelete(messages);
|
msg.channel.bulkDelete(messages);
|
||||||
// Logging the number of messages deleted on both the channel and console.
|
// Logging the number of messages deleted on both the channel and console.
|
||||||
msg.channel
|
msg.channel
|
||||||
.send("Deletion of messages successful. \n Total messages deleted including command: "+ newamount)
|
.send(
|
||||||
|
"Deletion of messages successful. \n Total messages deleted including command: " +
|
||||||
|
newamount
|
||||||
|
)
|
||||||
.then(message => message.delete(5000));
|
.then(message => message.delete(5000));
|
||||||
console.log('Deletion of messages successful. \n Total messages deleted including command: '+ newamount)
|
console.log(
|
||||||
|
"Deletion of messages successful. \n Total messages deleted including command: " +
|
||||||
|
newamount
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log('Error while doing Bulk Delete');
|
console.log("Error while doing Bulk Delete");
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
msg.channel
|
msg.channel
|
||||||
.send('only moderators can use this command!')
|
.send("only moderators can use this command!")
|
||||||
.then(message => message.delete(5000));
|
.then(message => message.delete(5000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,48 +1,62 @@
|
||||||
let request = require('request');
|
let request = require("request");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let hasPerms = require('../helpers.js').hasPerms;
|
let hasPerms = require("../helpers.js").hasPerms;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let ChannelID = config.get('gitrelease').channel;
|
let ChannelID = config.get("gitrelease").channel;
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"releasenotes" // command that is in this file, every command needs it own export as shown below
|
"releasenotes" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
];
|
||||||
|
|
||||||
|
|
||||||
exports.releasenotes = {
|
exports.releasenotes = {
|
||||||
usage: "",
|
usage: "",
|
||||||
description: 'gets current release notes from GITHUB',
|
description: "gets current release notes from GITHUB",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
|
|
||||||
var headers = {
|
var 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
|
||||||
var options = {
|
var options = {
|
||||||
url: 'https://api.github.com/repos/lbryio/lbry-app/releases/latest',
|
url: "https://api.github.com/repos/lbryio/lbry-app/releases/latest",
|
||||||
method: 'GET',
|
method: "GET",
|
||||||
headers: headers,
|
headers: headers
|
||||||
}
|
};
|
||||||
|
|
||||||
// Start the request
|
// Start the request
|
||||||
request(options, function (error, response, body) {
|
request(options, function(error, response, body) {
|
||||||
releasemessage = JSON.parse(body).body
|
releasemessage = JSON.parse(body).body;
|
||||||
releasename = JSON.parse(body).name
|
releasename = JSON.parse(body).name;
|
||||||
releasedate = JSON.parse(body).published_at
|
releasedate = JSON.parse(body).published_at;
|
||||||
releaseurl = JSON.parse(body).html_url
|
releaseurl = JSON.parse(body).html_url;
|
||||||
message = {"embed": {"title": "*Download " + releasename + " here!*","description": releasemessage,"url": releaseurl,"color": 7976557,"timestamp": releasedate,"author": {"name": "Lbry-app Release Notes for " + releasename,"icon_url": "http://www.pngall.com/wp-content/uploads/2016/04/Github-PNG-Image.png"},"footer": {"icon_url": "https://i.imgur.com/yWf5USu.png","text": "Lbry-app Updated "}}}
|
message = {
|
||||||
|
embed: {
|
||||||
|
title: "*Download " + releasename + " here!*",
|
||||||
|
description: releasemessage,
|
||||||
|
url: releaseurl,
|
||||||
|
color: 7976557,
|
||||||
|
timestamp: releasedate,
|
||||||
|
author: {
|
||||||
|
name: "Lbry-app Release Notes for " + releasename,
|
||||||
|
icon_url:
|
||||||
|
"http://www.pngall.com/wp-content/uploads/2016/04/Github-PNG-Image.png"
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png",
|
||||||
|
text: "Lbry-app Updated "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
if (inPrivate(msg)) {
|
if (inPrivate(msg)) {
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hasPerms(msg) && suffix === "post") {
|
if (hasPerms(msg) && suffix === "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");
|
||||||
msg.author.send(message)
|
msg.author.send(message);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
|
var config = require("config");
|
||||||
var config = require('config');
|
rolelist = config.get("rolelist");
|
||||||
rolelist = config.get('rolelist');
|
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"addrole", // command that is in this file, every command needs it own export as shown below
|
"addrole", // command that is in this file, every command needs it own export as shown below
|
||||||
"delrole",
|
"delrole",
|
||||||
"roles"
|
"roles"
|
||||||
]
|
];
|
||||||
|
|
||||||
exports.addrole = {
|
exports.addrole = {
|
||||||
usage: "<role to add>",
|
usage: "<role to add>",
|
||||||
description: 'description of command',
|
description: "description of command",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
// 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.
|
||||||
//amsg.reply(rolelist.allowedroles.includes(suffix));
|
//amsg.reply(rolelist.allowedroles.includes(suffix));
|
||||||
var newrole = msg.guild.roles.find('name', suffix);
|
var newrole = msg.guild.roles.find("name", suffix);
|
||||||
//var rolecheck = msg.guild.roles;
|
//var rolecheck = msg.guild.roles;
|
||||||
//var rolecheckvar = JSON.parse(rolecheck).find('name', suffix);
|
//var rolecheckvar = JSON.parse(rolecheck).find('name', suffix);
|
||||||
|
|
||||||
|
@ -25,68 +24,82 @@ exports.addrole = {
|
||||||
if (rolelist.allowedroles.includes(suffix)) {
|
if (rolelist.allowedroles.includes(suffix)) {
|
||||||
//console.log('Role is in allowed roles.');
|
//console.log('Role is in allowed roles.');
|
||||||
//console.log('Role to add: ' + newrole);
|
//console.log('Role to add: ' + newrole);
|
||||||
if (!msg.member.roles.find('name', suffix)) {
|
if (!msg.member.roles.find("name", suffix)) {
|
||||||
msg.member.addRole(newrole)
|
msg.member
|
||||||
.then(msg.channel.send(msg.member + ' has been added to the ' + suffix + ' role!'));
|
.addRole(newrole)
|
||||||
|
.then(
|
||||||
|
msg.channel.send(
|
||||||
|
msg.member + " has been added to the " + suffix + " role!"
|
||||||
|
)
|
||||||
|
);
|
||||||
//console.log('Added role')
|
//console.log('Added role')
|
||||||
//msg.channel.send(msg.member + ' has been added to the ' + suffix + ' role!');
|
//msg.channel.send(msg.member + ' has been added to the ' + suffix + ' role!');
|
||||||
|
} else {
|
||||||
|
msg.channel.send(
|
||||||
|
"It seems that you already have that role! Try removing it first with the delrole command!"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else{
|
} else {
|
||||||
msg.channel.send('It seems that you already have that role! Try removing it first with the delrole command!');
|
msg.channel.send(
|
||||||
|
"That role isn't one you can add yourself too! Please run the roles command to find out which ones are allowed."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
msg.channel.send("That role isn't one you can add yourself too! Please run the roles command to find out which ones are allowed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
exports.delrole = {
|
exports.delrole = {
|
||||||
usage: "<role to remove>",
|
usage: "<role to remove>",
|
||||||
description: 'description of command',
|
description: "description of command",
|
||||||
process: function(bot,msg,suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
// 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 oldrole = msg.guild.roles.find('name', suffix);
|
let oldrole = msg.guild.roles.find("name", suffix);
|
||||||
//console.log(oldrole);
|
//console.log(oldrole);
|
||||||
//console.log('Delrole Event firing.');
|
//console.log('Delrole Event firing.');
|
||||||
//console.log(msg);
|
//console.log(msg);
|
||||||
//console.log('Printing Suffix! ' + suffix);
|
//console.log('Printing Suffix! ' + suffix);
|
||||||
if (rolelist.allowedroles.includes(suffix)) {
|
if (rolelist.allowedroles.includes(suffix)) {
|
||||||
if (msg.member.roles.find('name', suffix)) {
|
if (msg.member.roles.find("name", suffix)) {
|
||||||
msg.member.removeRole(oldrole)
|
msg.member
|
||||||
.then(msg.channel.send(msg.member + ' has been removed from the ' + suffix + ' role!'));
|
.removeRole(oldrole)
|
||||||
|
.then(
|
||||||
|
msg.channel.send(
|
||||||
|
msg.member + " has been removed from the " + suffix + " role!"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
msg.channel.send(
|
||||||
|
"You don't seem to have that role! Try adding it first with the addrole command!"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
msg.channel.send("You don't seem to have that role! Try adding it first with the addrole command!");
|
msg.channel.send(
|
||||||
|
"That role isn't one you can add yourself too! Please run the roles command to find out which ones are allowed."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
msg.channel.send("That role isn't one you can add yourself too! Please run the roles command to find out which ones are allowed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
exports.roles = {
|
exports.roles = {
|
||||||
usage: "",
|
usage: "",
|
||||||
description: 'description of command',
|
description: "description of command",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
// 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.
|
||||||
msg.channel.send({embed: {
|
msg.channel.send({
|
||||||
|
embed: {
|
||||||
color: 3447003,
|
color: 3447003,
|
||||||
title: "Wunderbot",
|
title: "Wunderbot",
|
||||||
description: "You have accessed the rolebot function of Wunderbot!",
|
description: "You have accessed the rolebot function of Wunderbot!",
|
||||||
fields: [{
|
fields: [
|
||||||
|
{
|
||||||
name: "List of roles",
|
name: "List of roles",
|
||||||
value: buildRoleString(rolelist.allowedroles),
|
value: buildRoleString(rolelist.allowedroles),
|
||||||
inline: false
|
inline: false
|
||||||
}],
|
|
||||||
footer:{
|
|
||||||
icon_url: msg.author.avatarURL,
|
|
||||||
text: 'Requested by: ' + JSON.stringify(msg.author.username)
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
}});
|
footer: {
|
||||||
|
icon_url: msg.author.avatarURL,
|
||||||
|
text: "Requested by: " + JSON.stringify(msg.author.username)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
//msg.channel.send(JSON.stringify(rolelist.allowedroles));
|
//msg.channel.send(JSON.stringify(rolelist.allowedroles));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -94,7 +107,7 @@ exports.roles = {
|
||||||
function buildRoleString(roles) {
|
function buildRoleString(roles) {
|
||||||
let str = "";
|
let str = "";
|
||||||
for (let i = 0; i < roles.length; i++) {
|
for (let i = 0; i < roles.length; i++) {
|
||||||
str += "`" + roles[i] + "`" + '\n';
|
str += "`" + roles[i] + "`" + "\n";
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@ const authors = [];
|
||||||
let warned = [];
|
let warned = [];
|
||||||
let banned = [];
|
let banned = [];
|
||||||
let messagelog = [];
|
let messagelog = [];
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let botlog = config.get('moderation').logchannel;
|
let botlog = config.get("moderation").logchannel;
|
||||||
let hasPerms = require('../helpers.js').hasPerms;
|
let hasPerms = require("../helpers.js").hasPerms;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let hasExcludedSpamChannels = require('../helpers.js').hasExcludedSpamChannels;
|
let hasExcludedSpamChannels = require("../helpers.js").hasExcludedSpamChannels;
|
||||||
let hasExcludedSpamUsers = require('../helpers.js').hasExcludedSpamUsers;
|
let hasExcludedSpamUsers = require("../helpers.js").hasExcludedSpamUsers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add simple spam protection to your discord server.
|
* Add simple spam protection to your discord server.
|
||||||
|
@ -16,39 +16,47 @@ let hasExcludedSpamUsers = require('../helpers.js').hasExcludedSpamUsers;
|
||||||
* @return {[type]} [description]
|
* @return {[type]} [description]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.custom = [
|
exports.custom = ["antiSpam"];
|
||||||
"antiSpam"
|
|
||||||
]
|
|
||||||
|
|
||||||
exports.antiSpam = function(bot) {
|
exports.antiSpam = function(bot) {
|
||||||
const warnBuffer = 5;
|
const warnBuffer = 5;
|
||||||
const maxBuffer = 10;
|
const maxBuffer = 10;
|
||||||
const interval = 1500;
|
const interval = 1500;
|
||||||
const warningMessage = ", Stop spamming or you will be banned! This is your warning!";
|
const warningMessage =
|
||||||
|
", Stop spamming or you will be banned! This is your warning!";
|
||||||
const banMessage = "has been banned for spamming!";
|
const banMessage = "has been banned for spamming!";
|
||||||
const maxDuplicatesWarning = 5;
|
const maxDuplicatesWarning = 5;
|
||||||
const maxDuplicatesBan = 10;
|
const maxDuplicatesBan = 10;
|
||||||
|
|
||||||
|
bot.on("message", msg => {
|
||||||
bot.on('message', msg => {
|
if (
|
||||||
if(inPrivate(msg) || hasPerms(msg) || msg.author.bot || hasExcludedSpamChannels(msg) || hasExcludedSpamUsers(msg)) {
|
inPrivate(msg) ||
|
||||||
return
|
hasPerms(msg) ||
|
||||||
|
msg.author.bot ||
|
||||||
|
hasExcludedSpamChannels(msg) ||
|
||||||
|
hasExcludedSpamUsers(msg)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(msg.author.id != bot.user.id){
|
if (msg.author.id != bot.user.id) {
|
||||||
var now = Math.floor(Date.now());
|
var now = Math.floor(Date.now());
|
||||||
authors.push({
|
authors.push({
|
||||||
"time": now,
|
time: now,
|
||||||
"author": msg.author.id
|
author: msg.author.id
|
||||||
});
|
});
|
||||||
messagelog.push({
|
messagelog.push({
|
||||||
"message": msg.content,
|
message: msg.content,
|
||||||
"author": msg.author.id
|
author: msg.author.id
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check how many times the same message has been sent.
|
// Check how many times the same message has been sent.
|
||||||
var msgMatch = 0;
|
var msgMatch = 0;
|
||||||
for (var i = 0; i < messagelog.length; i++) {
|
for (var i = 0; i < messagelog.length; i++) {
|
||||||
if (messagelog[i].message == msg.content && (messagelog[i].author == msg.author.id) && (msg.author.id !== bot.user.id)) {
|
if (
|
||||||
|
messagelog[i].message == msg.content &&
|
||||||
|
messagelog[i].author == msg.author.id &&
|
||||||
|
msg.author.id !== bot.user.id
|
||||||
|
) {
|
||||||
msgMatch++;
|
msgMatch++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,14 +75,12 @@ exports.antiSpam = function(bot) {
|
||||||
matched++;
|
matched++;
|
||||||
if (matched == warnBuffer && !warned.includes(msg.author.id)) {
|
if (matched == warnBuffer && !warned.includes(msg.author.id)) {
|
||||||
warn(msg, msg.author.id);
|
warn(msg, msg.author.id);
|
||||||
}
|
} else if (matched == maxBuffer) {
|
||||||
else if (matched == maxBuffer) {
|
|
||||||
if (!banned.includes(msg.author.id)) {
|
if (!banned.includes(msg.author.id)) {
|
||||||
ban(msg, msg.author.id);
|
ban(msg, msg.author.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (authors[i].time < now - interval) {
|
||||||
else if (authors[i].time < now - interval) {
|
|
||||||
authors.splice(i);
|
authors.splice(i);
|
||||||
warned.splice(warned.indexOf(authors[i]));
|
warned.splice(warned.indexOf(authors[i]));
|
||||||
banned.splice(warned.indexOf(authors[i]));
|
banned.splice(warned.indexOf(authors[i]));
|
||||||
|
@ -106,22 +112,28 @@ exports.antiSpam = function(bot) {
|
||||||
for (var i = 0; i < messagelog.length; i++) {
|
for (var i = 0; i < messagelog.length; i++) {
|
||||||
if (messagelog[i].author == msg.author.id) {
|
if (messagelog[i].author == msg.author.id) {
|
||||||
messagelog.splice(i);
|
messagelog.splice(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
banned.push(msg.author.id);
|
banned.push(msg.author.id);
|
||||||
|
|
||||||
var user = msg.channel.guild.members.find(member => member.user.id === msg.author.id);
|
var user = msg.channel.guild.members.find(
|
||||||
|
member => member.user.id === msg.author.id
|
||||||
|
);
|
||||||
if (user) {
|
if (user) {
|
||||||
user.ban().then((member) => {
|
user
|
||||||
msg.channel.send(msg.author + " " +banMessage);
|
.ban()
|
||||||
bot.channels.get(botlog).send(msg.author + " " +banMessage);
|
.then(member => {
|
||||||
|
msg.channel.send(msg.author + " " + banMessage);
|
||||||
|
bot.channels.get(botlog).send(msg.author + " " + banMessage);
|
||||||
return true;
|
return true;
|
||||||
}).catch(() => {
|
})
|
||||||
msg.channel.send("insufficient permission to kick " + msg.author + " for spamming.");
|
.catch(() => {
|
||||||
|
msg.channel.send(
|
||||||
|
"insufficient permission to kick " + msg.author + " for spamming."
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,56 +1,59 @@
|
||||||
let request = require('request');
|
let request = require("request");
|
||||||
let wget = require('wget');
|
let wget = require("wget");
|
||||||
let fs = require('fs');
|
let fs = require("fs");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let hasSpeechBotChannels = require('../helpers.js').hasSpeechBotChannels;
|
let hasSpeechBotChannels = require("../helpers.js").hasSpeechBotChannels;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let ChannelID = config.get('speechbot').mainchannel;
|
let ChannelID = config.get("speechbot").mainchannel;
|
||||||
//debug output "true/false" outputs same error as slack message in console if set to true
|
//debug output "true/false" outputs same error as slack message in console if set to true
|
||||||
//if set to false console will be left blank like normal
|
//if set to false console will be left blank like normal
|
||||||
//some have more info on file details of error
|
//some have more info on file details of error
|
||||||
let FullDebug = "true"
|
let FullDebug = "true";
|
||||||
//outputs response from speech, very bulk reply
|
//outputs response from speech, very bulk reply
|
||||||
let ResponseDebug = "false"
|
let ResponseDebug = "false";
|
||||||
|
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"speech" // command that is in this file, every command needs it own export as shown below
|
"speech" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
];
|
||||||
|
|
||||||
exports.speech = {
|
exports.speech = {
|
||||||
usage: "<name>",
|
usage: "<name>",
|
||||||
description: "gets top claim from spee.ch, coming soon post to spee.ch",
|
description: "gets top claim from spee.ch, coming soon post to spee.ch",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
if(!hasSpeechBotChannels(msg) && !inPrivate(msg)){
|
if (!hasSpeechBotChannels(msg) && !inPrivate(msg)) {
|
||||||
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to speech bot.');
|
msg.channel.send(
|
||||||
|
"Please use <#" + ChannelID + "> or DMs to talk to speech bot."
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var command = "!speech";
|
||||||
var command = "!speech"
|
words = suffix
|
||||||
words = suffix.trim().split(' ').filter( function(n){return n !== "";} );
|
.trim()
|
||||||
|
.split(" ")
|
||||||
|
.filter(function(n) {
|
||||||
|
return n !== "";
|
||||||
|
});
|
||||||
var imagename = words[0];
|
var imagename = words[0];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//check if image name is help, if it is then do help message
|
//check if image name is help, if it is then do help message
|
||||||
if (imagename == "help") {
|
if (imagename == "help") {
|
||||||
doHelp(bot,msg,suffix)
|
doHelp(bot, msg, suffix);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//check if imagename is defined if not do error
|
//check if imagename is defined if not do error
|
||||||
if (imagename === undefined) {
|
if (imagename === undefined) {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
var message = "`no name provided`"
|
var message = "`no name provided`";
|
||||||
console.log('no name provided');
|
console.log("no name provided");
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
doHelp(bot,msg,suffix)
|
doHelp(bot, msg, suffix);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = "`no name provided`"
|
var message = "`no name provided`";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
doHelp(bot,msg,suffix)
|
doHelp(bot, msg, suffix);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,140 +63,165 @@ exports.speech = {
|
||||||
//check if a url is provided if none do help message
|
//check if a url is provided if none do help message
|
||||||
if (filepath === undefined) {
|
if (filepath === undefined) {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
var message = "`no url provided, fetching image from:`\n" +
|
var message =
|
||||||
"https://spee.ch/" + imagename
|
"`no url provided, fetching image from:`\n" +
|
||||||
console.log('no url provided');
|
"https://spee.ch/" +
|
||||||
|
imagename;
|
||||||
|
console.log("no url provided");
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = "`no url provided, fetching image from:`\n" +
|
var message =
|
||||||
"https://spee.ch/" + imagename
|
"`no url provided, fetching image from:`\n" +
|
||||||
|
"https://spee.ch/" +
|
||||||
|
imagename;
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//prepare url for other uses
|
//prepare url for other uses
|
||||||
//we will just set filepath to url to be safe
|
//we will just set filepath to url to be safe
|
||||||
var url = filepath;
|
var url = filepath;
|
||||||
//parse first 4 letters of url should be http
|
//parse first 4 letters of url should be http
|
||||||
var linkvalid = url.slice(0, 4)
|
var linkvalid = url.slice(0, 4);
|
||||||
|
|
||||||
//check of url provided begins with http in not throw error and help message
|
//check of url provided begins with http in not throw error and help message
|
||||||
if (linkvalid !== "http") {
|
if (linkvalid !== "http") {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
var message = '`error not a valid url, please start with http or https`'
|
var message =
|
||||||
console.log('invalid url provided: ' + filepath);
|
"`error not a valid url, please start with http or https`";
|
||||||
msg.channel.send(message);
|
console.log("invalid url provided: " + filepath);
|
||||||
return
|
|
||||||
} else {
|
|
||||||
var message = '`error not a valid url, please start with http or https`'
|
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return;
|
return;
|
||||||
}}
|
} else {
|
||||||
|
var message =
|
||||||
|
"`error not a valid url, please start with http or https`";
|
||||||
|
msg.channel.send(message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//function to check if url is an image
|
//function to check if url is an image
|
||||||
var isUriImage = function(uri) {
|
var isUriImage = function(uri) {
|
||||||
//make sure we remove any nasty GET params
|
//make sure we remove any nasty GET params
|
||||||
uri = uri.split('?')[0];
|
uri = uri.split("?")[0];
|
||||||
//moving on, split the uri into parts that had dots before them
|
//moving on, split the uri into parts that had dots before them
|
||||||
var parts = uri.split('.');
|
var parts = uri.split(".");
|
||||||
//get the last part ( should be the extension )
|
//get the last part ( should be the extension )
|
||||||
var extension = parts[parts.length-1];
|
var extension = parts[parts.length - 1];
|
||||||
//define some image types to test against
|
//define some image types to test against
|
||||||
var imageTypes = ['jpg','jpeg','tiff','png','gif','bmp'];
|
var imageTypes = ["jpg", "jpeg", "tiff", "png", "gif", "bmp"];
|
||||||
//check if the extension matches anything in the list. if it does set true if not set false
|
//check if the extension matches anything in the list. if it does set true if not set false
|
||||||
if(imageTypes.indexOf(extension) !== -1) {
|
if (imageTypes.indexOf(extension) !== -1) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//check if url is an image if its not throw error and help message
|
//check if url is an image if its not throw error and help message
|
||||||
if (isUriImage(url) === false) {
|
if (isUriImage(url) === false) {
|
||||||
if (FullDebug === "true"){
|
if (FullDebug === "true") {
|
||||||
var message = '`error not a valid image url, be sure the link includes a file type`'
|
var message =
|
||||||
console.log('invalid url provided: ' + url);
|
"`error not a valid image url, be sure the link includes a file type`";
|
||||||
|
console.log("invalid url provided: " + url);
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = '`error not a valid image url, be sure the link includes a file type`'
|
var message =
|
||||||
|
"`error not a valid image url, be sure the link includes a file type`";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//set third word to nsfw, with it being an optional functionality
|
//set third word to nsfw, with it being an optional functionality
|
||||||
var eighteen = words[2];
|
var eighteen = words[2];
|
||||||
|
|
||||||
//check is NSFW if yes or no sets proper value if none
|
//check is NSFW if yes or no sets proper value if none
|
||||||
if (eighteen == "" || eighteen == "none" || eighteen == undefined || eighteen == null || eighteen == "no"|| eighteen == "false" || eighteen == false || eighteen == "n") {
|
if (
|
||||||
|
eighteen == "" ||
|
||||||
|
eighteen == "none" ||
|
||||||
|
eighteen == undefined ||
|
||||||
|
eighteen == null ||
|
||||||
|
eighteen == "no" ||
|
||||||
|
eighteen == "false" ||
|
||||||
|
eighteen == false ||
|
||||||
|
eighteen == "n"
|
||||||
|
) {
|
||||||
eighteen = "no";
|
eighteen = "no";
|
||||||
} else {
|
} else {
|
||||||
eighteen = "yes"
|
eighteen = "yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare url for wget
|
//prepare url for wget
|
||||||
var source = url;
|
var source = url;
|
||||||
//parse the filename to use to save file
|
//parse the filename to use to save file
|
||||||
filepath = source.split('/').pop();
|
filepath = source.split("/").pop();
|
||||||
//set proper directory for downloading image
|
//set proper directory for downloading image
|
||||||
var outputFile = 'speech-uploads/' + filepath;
|
var outputFile = "speech-uploads/" + filepath;
|
||||||
//set download directory to current working directory
|
//set download directory to current working directory
|
||||||
var dir = process.cwd() ;
|
var dir = process.cwd();
|
||||||
//set full path to directory for speech uploading
|
//set full path to directory for speech uploading
|
||||||
var fullpath = dir + '\\speech-uploads\\' + filepath;
|
var fullpath = dir + "\\speech-uploads\\" + filepath;
|
||||||
|
|
||||||
//download url via wget
|
//download url via wget
|
||||||
var download = wget.download(url, outputFile);
|
var download = wget.download(url, outputFile);
|
||||||
//check if url is reachable if not throw error
|
//check if url is reachable if not throw error
|
||||||
download.on('error', function(err) {
|
download.on("error", function(err) {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
console.log("error could not reach: " + url + " : " + err);
|
console.log("error could not reach: " + url + " : " + err);
|
||||||
var message = '`error url could not be reached`'
|
var message = "`error url could not be reached`";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = '`error url could not be reached`'
|
var message = "`error url could not be reached`";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
download.on('end', (output) => {
|
download.on("end", output => {
|
||||||
//if no errors and file ready -> do the request
|
//if no errors and file ready -> do the request
|
||||||
output && doSteps(bot, imagename, url, eighteen);
|
output && doSteps(bot, imagename, url, eighteen);
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//send help message
|
//send help message
|
||||||
function doHelp(bot,msg,suffix) {
|
function doHelp(bot, msg, suffix) {
|
||||||
msg.channel.send(
|
msg.channel.send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
title: "",
|
||||||
"title": "",
|
description:
|
||||||
"description": '**!speech `<Name>`** : *displays top claim on speech* \n\n\n' +
|
"**!speech `<Name>`** : *displays top claim on speech* \n\n\n" +
|
||||||
"**COMING SOON POSTING TO SPEECH** \n\n" +
|
"**COMING SOON POSTING TO SPEECH** \n\n" +
|
||||||
'**!speech `<Name> <URL> <NSFW>`** : *Uploads Image URL to Spee.ch* \n' +
|
"**!speech `<Name> <URL> <NSFW>`** : *Uploads Image URL to Spee.ch* \n" +
|
||||||
'**NOTE : dont include spaces in name (NSFW is optional true/false, if left blank will defualt to false)** \n' +
|
"**NOTE : dont include spaces in name (NSFW is optional true/false, if left blank will defualt to false)** \n" +
|
||||||
'EXAMPLE : `!speech my-image-name https://url/to/image.png false`',
|
"EXAMPLE : `!speech my-image-name https://url/to/image.png false`",
|
||||||
"color": 7976557,
|
color: 7976557,
|
||||||
"author": {
|
author: {
|
||||||
"name": "Speech Bot Help",
|
name: "Speech Bot Help",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//send post request to speech
|
//send post request to speech
|
||||||
function doSteps(bot, imagename, url, eighteen) {
|
function doSteps(bot, imagename, url, eighteen) {
|
||||||
request.post(
|
request.post(
|
||||||
//url to send post request
|
//url to send post request
|
||||||
'https://spee.ch/api/publish',
|
"https://spee.ch/api/publish",
|
||||||
//json payload
|
//json payload
|
||||||
{ json: { name: imagename ,file: fullpath,nsfw: eighteen } },
|
{
|
||||||
|
json: {
|
||||||
|
name: imagename,
|
||||||
|
file: fullpath,
|
||||||
|
nsfw: eighteen
|
||||||
|
}
|
||||||
|
},
|
||||||
//get response from server
|
//get response from server
|
||||||
function (error, response, body) {
|
function(error, response, body) {
|
||||||
//output response if ResponseDebug set to true
|
//output response if ResponseDebug set to true
|
||||||
if (ResponseDebug === "true") {
|
if (ResponseDebug === "true") {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
@ -206,13 +234,15 @@ request.post(
|
||||||
if (body.message === "no files found in request") {
|
if (body.message === "no files found in request") {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
console.log("no file found: " + fullpath);
|
console.log("no file found: " + fullpath);
|
||||||
var message = '`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists';
|
var message =
|
||||||
|
"`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = '`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists';
|
var message =
|
||||||
|
"`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,26 +250,43 @@ request.post(
|
||||||
if (body.message === "no name field found in request") {
|
if (body.message === "no name field found in request") {
|
||||||
if (FullDebug === "true") {
|
if (FullDebug === "true") {
|
||||||
console.log("no name field found: " + imagename);
|
console.log("no name field found: " + imagename);
|
||||||
var message = '`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists';
|
var message =
|
||||||
|
"`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
var message = '`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists';
|
var message =
|
||||||
|
"`Failed to upload file internally!!`\n please contact <@244245498746241025> or another moderator if the issue persists";
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if no errors post this message
|
//if no errors post this message
|
||||||
var message = 'uploading... \n "name":"' + imagename + '",\n "URL": "' + url + '",\n "nsfw":"' + eighteen + '"\n to spee.ch';
|
var message =
|
||||||
console.log('uploading... \n "name":"' + imagename + '",\n "file name": "' + filepath + '",\n "url":"' + url + '"\n "path":"' + fullpath + '"\n "nsfw": "' + eighteen + '"' );
|
'uploading... \n "name":"' +
|
||||||
|
imagename +
|
||||||
|
'",\n "URL": "' +
|
||||||
|
url +
|
||||||
|
'",\n "nsfw":"' +
|
||||||
|
eighteen +
|
||||||
|
'"\n to spee.ch';
|
||||||
|
console.log(
|
||||||
|
'uploading... \n "name":"' +
|
||||||
|
imagename +
|
||||||
|
'",\n "file name": "' +
|
||||||
|
filepath +
|
||||||
|
'",\n "url":"' +
|
||||||
|
url +
|
||||||
|
'"\n "path":"' +
|
||||||
|
fullpath +
|
||||||
|
'"\n "nsfw": "' +
|
||||||
|
eighteen +
|
||||||
|
'"'
|
||||||
|
);
|
||||||
msg.channel.send(message);
|
msg.channel.send(message);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,93 +1,183 @@
|
||||||
let jp = require('jsonpath');
|
let jp = require("jsonpath");
|
||||||
let moment = require('moment');
|
let moment = require("moment");
|
||||||
let numeral = require('numeral');
|
let numeral = require("numeral");
|
||||||
let request = require('request');
|
let request = require("request");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
let hasStatsBotChannels = require('../helpers.js').hasStatsBotChannels;
|
let hasStatsBotChannels = require("../helpers.js").hasStatsBotChannels;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
let ChannelID = config.get('statsbot').mainchannel;
|
let ChannelID = config.get("statsbot").mainchannel;
|
||||||
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 current a list of current Market stats',
|
description: "Displays current a list of current Market stats",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
var options = {
|
var options = {
|
||||||
defaultCurrency: 'USD',
|
defaultCurrency: "USD",
|
||||||
|
|
||||||
// supported currencies and api steps to arrive at the final value
|
// supported currencies and api steps to arrive at the final value
|
||||||
currencies: {
|
currencies: {
|
||||||
USD: { steps: ['LBCUSD'], format: '$0,0.00', sign:'USD $' },
|
USD: {
|
||||||
BTC: { steps: ['LBCBTC'], format: 'BTC 0,0.00000000', sign:'BTC' },
|
steps: ["LBCUSD"],
|
||||||
ETH: { steps: ['LBCETH'], format: 'ETH 0,0.00000000', sign: 'ETH' },
|
format: "$0,0.00",
|
||||||
GBP: { steps: ['LBCGBP'], format: '£0,0.00', sign: '£' },
|
sign: "USD $"
|
||||||
EUR: { steps: ['LBCEUR'], format: '€0,0.00', sign: '€' },
|
},
|
||||||
CAD: { steps: ['LBCCAD'], format: '$0,0.00', sign: 'CAD $' },
|
BTC: {
|
||||||
AUD: { steps: ['LBCAUD'], format: '$0,0.00', sign: 'AUD $' },
|
steps: ["LBCBTC"],
|
||||||
IDR: { steps: ['LBCIDR'], format: 'Rp0,0.00', sign: 'Rp' }
|
format: "BTC 0,0.00000000",
|
||||||
|
sign: "BTC"
|
||||||
|
},
|
||||||
|
ETH: {
|
||||||
|
steps: ["LBCETH"],
|
||||||
|
format: "ETH 0,0.00000000",
|
||||||
|
sign: "ETH"
|
||||||
|
},
|
||||||
|
GBP: {
|
||||||
|
steps: ["LBCGBP"],
|
||||||
|
format: "£0,0.00",
|
||||||
|
sign: "£"
|
||||||
|
},
|
||||||
|
EUR: {
|
||||||
|
steps: ["LBCEUR"],
|
||||||
|
format: "€0,0.00",
|
||||||
|
sign: "€"
|
||||||
|
},
|
||||||
|
CAD: {
|
||||||
|
steps: ["LBCCAD"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "CAD $"
|
||||||
|
},
|
||||||
|
AUD: {
|
||||||
|
steps: ["LBCAUD"],
|
||||||
|
format: "$0,0.00",
|
||||||
|
sign: "AUD $"
|
||||||
|
},
|
||||||
|
IDR: {
|
||||||
|
steps: ["LBCIDR"],
|
||||||
|
format: "Rp0,0.00",
|
||||||
|
sign: "Rp"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// api steps
|
// api steps
|
||||||
api: {
|
api: {
|
||||||
LBCBTC: { url: 'https://bittrex.com/api/v1.1/public/getticker?market=BTC-LBC', path: '$.result.Bid' },
|
LBCBTC: {
|
||||||
LBCUSD: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=usd', path: '$[0].price_usd' },
|
url: "https://bittrex.com/api/v1.1/public/getticker?market=BTC-LBC",
|
||||||
LBCGBP: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=gbp', path: '$[0].price_gbp' },
|
path: "$.result.Bid"
|
||||||
LBCETH: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=eth', path: '$[0].price_eth' },
|
},
|
||||||
LBCEUR: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=eur', path: '$[0].price_eur' },
|
LBCUSD: {
|
||||||
LBCAUD: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=aud', path: '$[0].price_aud' },
|
url:
|
||||||
LBCCAD: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=cad', path: '$[0].price_cad' },
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=usd",
|
||||||
LBCIDR: { url: 'https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=idr', path: '$[0].price_idr'}
|
path: "$[0].price_usd"
|
||||||
|
},
|
||||||
|
LBCGBP: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=gbp",
|
||||||
|
path: "$[0].price_gbp"
|
||||||
|
},
|
||||||
|
LBCETH: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=eth",
|
||||||
|
path: "$[0].price_eth"
|
||||||
|
},
|
||||||
|
LBCEUR: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=eur",
|
||||||
|
path: "$[0].price_eur"
|
||||||
|
},
|
||||||
|
LBCAUD: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=aud",
|
||||||
|
path: "$[0].price_aud"
|
||||||
|
},
|
||||||
|
LBCCAD: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=cad",
|
||||||
|
path: "$[0].price_cad"
|
||||||
|
},
|
||||||
|
LBCIDR: {
|
||||||
|
url:
|
||||||
|
"https://api.coinmarketcap.com/v1/ticker/library-credit/?convert=idr",
|
||||||
|
path: "$[0].price_idr"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// display date/time format
|
// display date/time format
|
||||||
dtFormat: 'Do MMM YYYY h:mma [UTC]',
|
dtFormat: "Do MMM YYYY h:mma [UTC]",
|
||||||
|
|
||||||
// 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: 300000
|
refreshTime: 300000
|
||||||
};
|
};
|
||||||
|
|
||||||
// store the last retrieved rate
|
// store the last retrieved rate
|
||||||
var command = '!stats';
|
var command = "!stats";
|
||||||
|
|
||||||
var currency = options.defaultCurrency;
|
var currency = options.defaultCurrency;
|
||||||
var amount = 1;
|
var amount = 1;
|
||||||
if(!inPrivate(msg) && !hasStatsBotChannels(msg)){
|
if (!inPrivate(msg) && !hasStatsBotChannels(msg)) {
|
||||||
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to stats bot.');
|
msg.channel.send(
|
||||||
|
"Please use <#" + ChannelID + "> or DMs to talk to stats bot."
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
doSteps(bot, msg, 'USD', amount);
|
doSteps(bot, msg, "USD", amount);
|
||||||
doSteps(bot, msg, 'EUR', amount);
|
doSteps(bot, msg, "EUR", amount);
|
||||||
doSteps(bot, msg, 'GBP', amount);
|
doSteps(bot, msg, "GBP", amount);
|
||||||
doSteps(bot, msg, 'ETH', amount);
|
doSteps(bot, msg, "ETH", amount);
|
||||||
doSteps(bot, msg, 'BTC', amount);
|
doSteps(bot, msg, "BTC", amount);
|
||||||
doSteps(bot, msg, 'CAD', amount);
|
doSteps(bot, msg, "CAD", amount);
|
||||||
doSteps(bot, msg, 'AUD', amount);
|
doSteps(bot, msg, "AUD", amount);
|
||||||
doSteps(bot, msg, 'IDR', amount);
|
doSteps(bot, msg, "IDR", amount);
|
||||||
setTimeout(function() { marketstats(bot,msg,suffix); }, 250);
|
setTimeout(function() {
|
||||||
|
marketstats(bot, msg, suffix);
|
||||||
|
}, 250);
|
||||||
//marketstats(bot,msg);
|
//marketstats(bot,msg);
|
||||||
//volume24(bot,msg); can't get this part to work, someone help me fix - i think it's because 24h_volume_usd starts with number
|
//volume24(bot,msg); can't get this part to work, someone help me fix - i think it's because 24h_volume_usd starts with number
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMessage(amount, rate, option) {
|
function formatMessage(amount, rate, option) {
|
||||||
var cur = option.sign;
|
var cur = option.sign;
|
||||||
var value = rate.rate * amount;
|
var value = rate.rate * amount;
|
||||||
if (option.sign == 'USD $' || option.sign == 'CAD $' || option.sign == 'AUD $' || option.sign == '£' || option.sign == '€'|| option.sign == 'Rp'){
|
if (
|
||||||
return '*' + numeral(amount).format('0,0[.][00000000]') + ' LBC = ' + cur +' '+ value.toFixed(2) + '*';
|
option.sign == "USD $" ||
|
||||||
|
option.sign == "CAD $" ||
|
||||||
|
option.sign == "AUD $" ||
|
||||||
|
option.sign == "£" ||
|
||||||
|
option.sign == "€" ||
|
||||||
|
option.sign == "Rp"
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
"*" +
|
||||||
|
numeral(amount).format("0,0[.][00000000]") +
|
||||||
|
" LBC = " +
|
||||||
|
cur +
|
||||||
|
" " +
|
||||||
|
value.toFixed(2) +
|
||||||
|
"*"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
"*" +
|
||||||
|
numeral(amount).format("0,0[.][00000000]") +
|
||||||
|
" LBC = " +
|
||||||
|
cur +
|
||||||
|
" " +
|
||||||
|
numeral(value).format("0,0[.][00000000]") +
|
||||||
|
"*"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return '*' + numeral(amount).format('0,0[.][00000000]') + ' LBC = ' + cur +' ' + numeral(value).format('0,0[.][00000000]') + '*';
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function formaty(n, decimals, currency) {
|
function formaty(n, decimals, currency) {
|
||||||
n = parseFloat(n);
|
n = parseFloat(n);
|
||||||
return currency + " " + n.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
|
return (
|
||||||
}
|
currency + " " + n.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,")
|
||||||
|
);
|
||||||
function doSteps(bot, msg, currency, amount) {
|
}
|
||||||
|
|
||||||
|
function doSteps(bot, msg, currency, amount) {
|
||||||
var option = options.currencies[currency];
|
var option = options.currencies[currency];
|
||||||
// copy the steps array
|
// copy the steps array
|
||||||
var steps = [];
|
var steps = [];
|
||||||
|
@ -96,73 +186,85 @@ function doSteps(bot, msg, currency, amount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
processSteps(bot, msg, currency, 0, amount, steps, option);
|
processSteps(bot, msg, currency, 0, amount, steps, option);
|
||||||
}
|
}
|
||||||
|
|
||||||
function marketstats(bot,msg,suffix) {
|
function marketstats(bot, msg, suffix) {
|
||||||
var statsurl='https://api.coinmarketcap.com/v1/ticker/library-credit/';
|
var statsurl = "https://api.coinmarketcap.com/v1/ticker/library-credit/";
|
||||||
|
|
||||||
request.get(statsurl, function(error, response, body) {
|
request.get(statsurl, 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 marketcap = 0;
|
var marketcap = 0;
|
||||||
try {
|
try {
|
||||||
marketcap = jp.query(JSON.parse(body), '$[0].market_cap_usd');
|
marketcap = jp.query(JSON.parse(body), "$[0].market_cap_usd");
|
||||||
if (Array.isArray(marketcap) && marketcap.length > 0) {
|
if (Array.isArray(marketcap) && marketcap.length > 0) {
|
||||||
marketcap = marketcap[0];
|
marketcap = marketcap[0];
|
||||||
marketcap = formaty(marketcap,2,'$')
|
marketcap = formaty(marketcap, 2, "$");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
// invalid response or pair rate
|
// invalid response or pair rate
|
||||||
}
|
}
|
||||||
|
|
||||||
var statmsg = '*'+'Marketcap: '+marketcap+'*\n';
|
var statmsg = "*" + "Marketcap: " + marketcap + "*\n";
|
||||||
|
|
||||||
msg.channel.send(statmsg);
|
msg.channel.send(statmsg);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function volume24(bot,msg,suffix) {
|
function volume24(bot, msg, suffix) {
|
||||||
var statsurl='https://api.coinmarketcap.com/v1/ticker/library-credit/';
|
var statsurl = "https://api.coinmarketcap.com/v1/ticker/library-credit/";
|
||||||
|
|
||||||
request.get(statsurl, function(error, response, body) {
|
request.get(statsurl, 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 volume24 = 0;
|
var volume24 = 0;
|
||||||
try {
|
try {
|
||||||
volume24 = jp.query(JSON.parse(body),'$[0].24h_volume_usd');
|
volume24 = jp.query(JSON.parse(body), "$[0].24h_volume_usd");
|
||||||
if (Array.isArray(volume24) && volume24.length > 0) {
|
if (Array.isArray(volume24) && volume24.length > 0) {
|
||||||
volume24 = volume24[0];
|
volume24 = volume24[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
// invalid response or pair rate
|
// invalid response or pair rate
|
||||||
}
|
}
|
||||||
|
|
||||||
var statmsg = '*'+'Volume: $'+volume24+'*\n';
|
var statmsg = "*" + "Volume: $" + volume24 + "*\n";
|
||||||
|
|
||||||
msg.channel.send(statmsg);
|
msg.channel.send(statmsg);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function processSteps(bot, msg, currency, rate, amount, steps, option) {
|
function processSteps(bot, msg, currency, rate, amount, steps, option) {
|
||||||
if (steps.length > 0) {
|
if (steps.length > 0) {
|
||||||
var pairName = steps[0];
|
var 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];
|
var 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;
|
var pairRate = 0;
|
||||||
|
@ -176,7 +278,7 @@ function processSteps(bot, msg, currency, rate, amount, steps, option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pairRate > 0) {
|
if (pairRate > 0) {
|
||||||
rate = (rate === 0) ? pairRate : rate * pairRate;
|
rate = rate === 0 ? pairRate : rate * pairRate;
|
||||||
steps.shift();
|
steps.shift();
|
||||||
if (steps.length > 0) {
|
if (steps.length > 0) {
|
||||||
processSteps(bot, currency, rate, amount, steps, option);
|
processSteps(bot, currency, rate, amount, steps, option);
|
||||||
|
@ -184,15 +286,19 @@ function processSteps(bot, msg, currency, rate, amount, steps, option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// final step, cache and then response
|
// final step, cache and then response
|
||||||
var result = { rate: rate, time: moment() };
|
var result = {
|
||||||
|
rate: rate,
|
||||||
|
time: moment()
|
||||||
|
};
|
||||||
|
|
||||||
msg.channel.send(formatMessage(amount, result, option));
|
msg.channel.send(formatMessage(amount, result, option));
|
||||||
} else {
|
} else {
|
||||||
msg.channel.send('The rate returned for the ' + pairName + ' pair was invalid.');
|
msg.channel.send(
|
||||||
|
"The rate returned for the " + pairName + " pair was invalid."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
const bitcoin = require('bitcoin');
|
const bitcoin = require("bitcoin");
|
||||||
let config = require('config');
|
let config = require("config");
|
||||||
config = config.get('lbrycrd');
|
config = config.get("lbrycrd");
|
||||||
const lbry = new bitcoin.Client(config);
|
const lbry = new bitcoin.Client(config);
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = ["tip"];
|
||||||
"tip"
|
|
||||||
]
|
|
||||||
exports.tip = {
|
exports.tip = {
|
||||||
usage: "<subcommand>",
|
usage: "<subcommand>",
|
||||||
description: 'balance: get your balance\n deposit: get address for your deposits\n withdraw ADDRESS AMOUNT: withdraw AMOUNT credits to ADDRESS\n <user> <amount>: mention a user with @ and then the amount to tip them',
|
description:
|
||||||
process: async function(bot,msg,suffix){
|
"balance: get your balance\n deposit: get address for your deposits\n withdraw ADDRESS AMOUNT: withdraw AMOUNT credits to ADDRESS\n <user> <amount>: mention a user with @ and then the amount to tip them",
|
||||||
|
process: async function(bot, msg, suffix) {
|
||||||
return; // Tipping is now handled by the separate tipbot(in branch tipbot_dc), no need to to anything here...
|
return; // Tipping is now handled by the separate tipbot(in branch tipbot_dc), no need to to anything here...
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,226 +1,218 @@
|
||||||
let hasPerms = require('../helpers.js').hasPerms;
|
let hasPerms = require("../helpers.js").hasPerms;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require("../helpers.js").inPrivate;
|
||||||
|
|
||||||
exports.custom = [
|
exports.custom = ["onUserJoin"];
|
||||||
"onUserJoin"
|
|
||||||
]
|
|
||||||
exports.onUserJoin = function(bot) {
|
exports.onUserJoin = function(bot) {
|
||||||
|
bot.on("guildMemberAdd", member => {
|
||||||
bot.on('guildMemberAdd', member => {
|
member.send({
|
||||||
member.send(
|
embed: {
|
||||||
{
|
title: "*Click here for more info about LBRY!*",
|
||||||
"embed": {
|
description:
|
||||||
"title": "*Click here for more info about LBRY!*",
|
"**Welcome to LBRY Discord Community, you are now officially a LBRYian!** \n" +
|
||||||
"description": "**Welcome to LBRY Discord Community, you are now officially a LBRYian!** \n" +
|
"If you are new to LBRY and would like to learn more, see the links at the end of this message. \n" +
|
||||||
"If you are new to LBRY and would like to learn more, see the links at the end of this message. \n" +
|
"This community allows LBRYians to interact with the team directly and for us to engage users in order to grow the LBRY platform! \n" +
|
||||||
"This community allows LBRYians to interact with the team directly and for us to engage users in order to grow the LBRY platform! \n" +
|
"**Looking for *Rewards Verification*? Please make a request in the #verification channel. A mod will reach out to you, please be patient. Only 1 Reward account is allowed per person** \n",
|
||||||
"**Looking for *Rewards Verification*? Please make a request in the #verification channel. A mod will reach out to you, please be patient. Only 1 Reward account is allowed per person** \n",
|
url: "https://lbry.io/what",
|
||||||
"url": "https://lbry.io/what",
|
color: 7976557,
|
||||||
"color": 7976557,
|
author: {
|
||||||
"author": {
|
name: "Welcome to LBRY Discord Community",
|
||||||
"name": "Welcome to LBRY Discord Community",
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
member.send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"description": "1. Be respectful to other community members. Harrasment and vulgarity will not be tolerated \n" +
|
|
||||||
"2. Do not spam, advertise or post referral links \n" +
|
|
||||||
"3. Use appropriate channels for your discussions/questions. If you are looking for help with LBRY, use #help, for price talk, use #market-and-trading \n" +
|
|
||||||
"4. #general discussions should be at least somewhat related to LBRY, otherwise there is #random \n" +
|
|
||||||
"5. Do not post **not safe for work (NFSW)** content in any non-marked channels, there is #random-nsfw for that \n" +
|
|
||||||
"6. Do not direct message and LBRY team or mods without being asked to do so \n" +
|
|
||||||
"7. Do not request free LBC, begging will not be tolerated \n",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "Ground rules",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
member.send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"description": "1. Type !tip help to interact with our Tipbot which can be used to send and receive LBRY Credits (LBC). **Enable 2FA in your Discord account settings!** \n" +
|
|
||||||
"2. See the Frequently Asked Questions (FAQ) section below prior to asking for help or information on LBRY \n" +
|
|
||||||
"3. Backing up your LBRY wallet is your responsbility, see FAQ link below \n" +
|
|
||||||
"4. You can find the LBRY Block explorer at https://explorer.lbry.io \n" +
|
|
||||||
"5. Want to contribute more? Check out https://lbry.io/faq/contributing \n" +
|
|
||||||
"6. Are you a dev? Check out the #dev channel \n" +
|
|
||||||
"7. Want to share something you published? Post it on the #publishers channel \n",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "Helpful hints",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
member.send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"title": "*Click here for more info about LBRY!*",
|
|
||||||
"description": "[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Download the LBRY App here**_](https://lbry.io/get)",
|
|
||||||
"url": "https://lbry.io/what",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "What is LBRY?",
|
|
||||||
"url": "https://lbry.io/what",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
member.send(
|
member.send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
description:
|
||||||
"title": "*Click here to see all LBRY Frequently Asked Questions (FAQ)!*",
|
"1. Be respectful to other community members. Harrasment and vulgarity will not be tolerated \n" +
|
||||||
"description": "Want to backup your LBRY wallet? [**Backup**](https://lbry.io/faq/how-to-backup-wallet) \nLooking for LBRY data? [**Behind the scenes files**](https://lbry.io/faq/lbry-directories) \nTrouble starting LBRY? [**Startup troubleshooting**](https://lbry.io/faq/startup-troubleshooting) \nNeed help finding your log files (will help us troubleshoot!)? [**Find logs**](https://lbry.io/faq/how-to-find-lbry-log-file) \nNot able to stream any content? [**Troublshoot streaming**](https://lbry.io/faq/unable-to-stream)\nNeed help with publishing? [**How to Publish**](https://lbry.io/faq/how-to-publish) \nWant more LBRY Credits (LBC)? [**Get LBC**](https://lbry.io/faq/earn-credits) \nLooking for referral information? [**Referrals**](https://lbry.io/faq/referrals)",
|
"2. Do not spam, advertise or post referral links \n" +
|
||||||
"url": "https://lbry.io/faq",
|
"3. Use appropriate channels for your discussions/questions. If you are looking for help with LBRY, use #help, for price talk, use #market-and-trading \n" +
|
||||||
"color": 7976557,
|
"4. #general discussions should be at least somewhat related to LBRY, otherwise there is #random \n" +
|
||||||
"author": {
|
"5. Do not post **not safe for work (NFSW)** content in any non-marked channels, there is #random-nsfw for that \n" +
|
||||||
"name": "LBRY FAQ",
|
"6. Do not direct message and LBRY team or mods without being asked to do so \n" +
|
||||||
"url": "https://lbry.io/faq",
|
"7. Do not request free LBC, begging will not be tolerated \n",
|
||||||
"icon_url": "https://spee.ch/8/Id5Qoc3w.png"
|
color: 7976557,
|
||||||
}
|
author: {
|
||||||
|
name: "Ground rules",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
member.send(
|
member.send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
description:
|
||||||
"title": "*Have you checked out spee.ch yet?!*",
|
"1. Type !tip help to interact with our Tipbot which can be used to send and receive LBRY Credits (LBC). **Enable 2FA in your Discord account settings!** \n" +
|
||||||
"description": "[**spee.ch**](https://spee.ch) runs on top of the LBRY network - it's essentially an open source, censorship resistent and decentralized image and video sharing site with the added benefit of being a web-based (works on mobile too!) gateway into the LBRY network. spee.ch can be used to retrieve LBRY images/videos that are free by accessing them through a web browser. \nFor example, if content is located at lbry://loose-cannons-episode1#12c87bb42dd8832167b1e54edf72bbd37bc47622, you can view it on spee.ch at: https://spee.ch/12c87bb42dd8832167b1e54edf72bbd37bc47622/loose-cannons-episode1. You can also view channels on spee.ch, such as: https://spee.ch/@copchronicles:5c039dc7423657e59d78939df72c186e43273675 or https://spee.ch/@MinutePhysics:589276465a23c589801d874f484cc39f307d7ec7 \n\nspee.ch also allows you to create a channel to group your uploads and retreive them easily. These channels are separate from any you may have in the LBRY app since they exist on the spee.ch site via a login process. You can even share your channel name and password so that others can contribute to it.",
|
"2. See the Frequently Asked Questions (FAQ) section below prior to asking for help or information on LBRY \n" +
|
||||||
"url": "https://spee.ch/about",
|
"3. Backing up your LBRY wallet is your responsbility, see FAQ link below \n" +
|
||||||
"color": 7976557,
|
"4. You can find the LBRY Block explorer at https://explorer.lbry.io \n" +
|
||||||
"author": {
|
"5. Want to contribute more? Check out https://lbry.io/faq/contributing \n" +
|
||||||
"name": "spee.ch",
|
"6. Are you a dev? Check out the #dev channel \n" +
|
||||||
"url": "https://spee.ch",
|
"7. Want to share something you published? Post it on the #publishers channel \n",
|
||||||
"icon_url": "http://www.pd4pic.com/images/flag-green-blue-purple-indigo-bars-background.png"
|
color: 7976557,
|
||||||
}
|
author: {
|
||||||
|
name: "Helpful hints",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
member.send({
|
||||||
}
|
embed: {
|
||||||
|
title: "*Click here for more info about LBRY!*",
|
||||||
|
description:
|
||||||
|
"[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Download the LBRY App here**_](https://lbry.io/get)",
|
||||||
|
url: "https://lbry.io/what",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "What is LBRY?",
|
||||||
|
url: "https://lbry.io/what",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
member.send({
|
||||||
|
embed: {
|
||||||
|
title: "*Click here to see all LBRY Frequently Asked Questions (FAQ)!*",
|
||||||
|
description:
|
||||||
|
"Want to backup your LBRY wallet? [**Backup**](https://lbry.io/faq/how-to-backup-wallet) \nLooking for LBRY data? [**Behind the scenes files**](https://lbry.io/faq/lbry-directories) \nTrouble starting LBRY? [**Startup troubleshooting**](https://lbry.io/faq/startup-troubleshooting) \nNeed help finding your log files (will help us troubleshoot!)? [**Find logs**](https://lbry.io/faq/how-to-find-lbry-log-file) \nNot able to stream any content? [**Troublshoot streaming**](https://lbry.io/faq/unable-to-stream)\nNeed help with publishing? [**How to Publish**](https://lbry.io/faq/how-to-publish) \nWant more LBRY Credits (LBC)? [**Get LBC**](https://lbry.io/faq/earn-credits) \nLooking for referral information? [**Referrals**](https://lbry.io/faq/referrals)",
|
||||||
|
url: "https://lbry.io/faq",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "LBRY FAQ",
|
||||||
|
url: "https://lbry.io/faq",
|
||||||
|
icon_url: "https://spee.ch/8/Id5Qoc3w.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
member.send({
|
||||||
|
embed: {
|
||||||
|
title: "*Have you checked out spee.ch yet?!*",
|
||||||
|
description:
|
||||||
|
"[**spee.ch**](https://spee.ch) runs on top of the LBRY network - it's essentially an open source, censorship resistent and decentralized image and video sharing site with the added benefit of being a web-based (works on mobile too!) gateway into the LBRY network. spee.ch can be used to retrieve LBRY images/videos that are free by accessing them through a web browser. \nFor example, if content is located at lbry://loose-cannons-episode1#12c87bb42dd8832167b1e54edf72bbd37bc47622, you can view it on spee.ch at: https://spee.ch/12c87bb42dd8832167b1e54edf72bbd37bc47622/loose-cannons-episode1. You can also view channels on spee.ch, such as: https://spee.ch/@copchronicles:5c039dc7423657e59d78939df72c186e43273675 or https://spee.ch/@MinutePhysics:589276465a23c589801d874f484cc39f307d7ec7 \n\nspee.ch also allows you to create a channel to group your uploads and retreive them easily. These channels are separate from any you may have in the LBRY app since they exist on the spee.ch site via a login process. You can even share your channel name and password so that others can contribute to it.",
|
||||||
|
url: "https://spee.ch/about",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "spee.ch",
|
||||||
|
url: "https://spee.ch",
|
||||||
|
icon_url:
|
||||||
|
"http://www.pd4pic.com/images/flag-green-blue-purple-indigo-bars-background.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"welcome" // command that is in this file, every command needs it own export as shown below
|
"welcome" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
];
|
||||||
|
|
||||||
|
|
||||||
exports.welcome = {
|
exports.welcome = {
|
||||||
usage: "<@username>",
|
usage: "<@username>",
|
||||||
description: 'send welcome message to specified user',
|
description: "send welcome message to specified user",
|
||||||
process: function(bot,msg,suffix){
|
process: function(bot, msg, suffix) {
|
||||||
console.log(suffix)
|
console.log(suffix);
|
||||||
if (inPrivate(msg)) {
|
if (inPrivate(msg)) {
|
||||||
msg.channel.send("command cannot be used in a DM")
|
msg.channel.send("command cannot be used in a DM");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (suffix == "") {
|
if (suffix == "") {
|
||||||
msg.channel.send("no user defined")
|
msg.channel.send("no user defined");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (!hasPerms(msg)) {
|
if (!hasPerms(msg)) {
|
||||||
msg.channel.send("You Dont Have Permission To Use This Command!")
|
msg.channel.send("You Dont Have Permission To Use This Command!");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
msg.mentions.members.first().send(
|
msg.mentions.members.first().send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
title: "*Click here for more info about LBRY!*",
|
||||||
"title": "*Click here for more info about LBRY!*",
|
description:
|
||||||
"description": "**Welcome to LBRY Discord Community, you are now officially a LBRYian!** \n" +
|
"**Welcome to LBRY Discord Community, you are now officially a LBRYian!** \n" +
|
||||||
"If you are new to LBRY and would like to learn more, see the links at the end of this message. \n" +
|
"If you are new to LBRY and would like to learn more, see the links at the end of this message. \n" +
|
||||||
"This community allows LBRYians to interact with the team directly and for us to engage users in order to grow the LBRY platform! \n" +
|
"This community allows LBRYians to interact with the team directly and for us to engage users in order to grow the LBRY platform! \n" +
|
||||||
"**Looking for *Rewards Verification*? Please make a request in the #verification channel. A mod will reach out to you, please be patient. Only 1 Reward account is allowed per person** \n",
|
"**Looking for *Rewards Verification*? Please make a request in the #verification channel. A mod will reach out to you, please be patient. Only 1 Reward account is allowed per person** \n",
|
||||||
"url": "https://lbry.io/what",
|
url: "https://lbry.io/what",
|
||||||
"color": 7976557,
|
color: 7976557,
|
||||||
"author": {
|
author: {
|
||||||
"name": "Welcome to LBRY Discord Community",
|
name: "Welcome to LBRY Discord Community",
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
msg.mentions.members.first().send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"description": "1. Be respectful to other community members. Harrasment and vulgarity will not be tolerated \n" +
|
|
||||||
"2. Do not spam, advertise or post referral links \n" +
|
|
||||||
"3. Use appropriate channels for your discussions/questions. If you are looking for help with LBRY, use #help, for price talk, use #market-and-trading \n" +
|
|
||||||
"4. #general discussions should be at least somewhat related to LBRY, otherwise there is #random \n" +
|
|
||||||
"5. Do not post **not safe for work (NFSW)** content in any non-marked channels, there is #random-nsfw for that \n" +
|
|
||||||
"6. Do not direct message and LBRY team or mods without being asked to do so \n" +
|
|
||||||
"7. Do not request free LBC, begging will not be tolerated \n",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "Ground rules",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
msg.mentions.members.first().send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"description": "1. Type !tip help to interact with our Tipbot which can be used to send and receive LBRY Credits (LBC). **Enable 2FA in your Discord account settings!** \n" +
|
|
||||||
"2. See the Frequently Asked Questions (FAQ) section below prior to asking for help or information on LBRY \n" +
|
|
||||||
"3. Backing up your LBRY wallet is your responsbility, see FAQ link below \n" +
|
|
||||||
"4. You can find the LBRY Block explorer at https://explorer.lbry.io \n" +
|
|
||||||
"5. Want to contribute more? Check out https://lbry.io/faq/contributing \n" +
|
|
||||||
"6. Are you a dev? Check out the #dev channel \n" +
|
|
||||||
"7. Want to share something you published? Post it on the #publishers channel \n",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "Helpful hints",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
msg.mentions.members.first().send(
|
|
||||||
{
|
|
||||||
"embed": {
|
|
||||||
"title": "*Click here for more info about LBRY!*",
|
|
||||||
"description": "[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Download the LBRY App here**_](https://lbry.io/get)",
|
|
||||||
"url": "https://lbry.io/what",
|
|
||||||
"color": 7976557,
|
|
||||||
"author": {
|
|
||||||
"name": "What is LBRY?",
|
|
||||||
"url": "https://lbry.io/what",
|
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
msg.mentions.members.first().send(
|
msg.mentions.members.first().send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
description:
|
||||||
"title": "*Click here to see all LBRY Frequently Asked Questions (FAQ)!*",
|
"1. Be respectful to other community members. Harrasment and vulgarity will not be tolerated \n" +
|
||||||
"description": "Want to backup your LBRY wallet? [**Backup**](https://lbry.io/faq/how-to-backup-wallet) \nLooking for LBRY data? [**Behind the scenes files**](https://lbry.io/faq/lbry-directories) \nTrouble starting LBRY? [**Startup troubleshooting**](https://lbry.io/faq/startup-troubleshooting) \nNeed help finding your log files (will help us troubleshoot!)? [**Find logs**](https://lbry.io/faq/how-to-find-lbry-log-file) \nNot able to stream any content? [**Troublshoot streaming**](https://lbry.io/faq/unable-to-stream)\nNeed help with publishing? [**How to Publish**](https://lbry.io/faq/how-to-publish) \nWant more LBRY Credits (LBC)? [**Get LBC**](https://lbry.io/faq/earn-credits) \nLooking for referral information? [**Referrals**](https://lbry.io/faq/referrals)",
|
"2. Do not spam, advertise or post referral links \n" +
|
||||||
"url": "https://lbry.io/faq",
|
"3. Use appropriate channels for your discussions/questions. If you are looking for help with LBRY, use #help, for price talk, use #market-and-trading \n" +
|
||||||
"color": 7976557,
|
"4. #general discussions should be at least somewhat related to LBRY, otherwise there is #random \n" +
|
||||||
"author": {
|
"5. Do not post **not safe for work (NFSW)** content in any non-marked channels, there is #random-nsfw for that \n" +
|
||||||
"name": "LBRY FAQ",
|
"6. Do not direct message and LBRY team or mods without being asked to do so \n" +
|
||||||
"url": "https://lbry.io/faq",
|
"7. Do not request free LBC, begging will not be tolerated \n",
|
||||||
"icon_url": "https://spee.ch/8/Id5Qoc3w.png"
|
color: 7976557,
|
||||||
}
|
author: {
|
||||||
|
name: "Ground rules",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
msg.mentions.members.first().send(
|
msg.mentions.members.first().send({
|
||||||
{
|
embed: {
|
||||||
"embed": {
|
description:
|
||||||
"title": "*Have you checked out spee.ch yet?!*",
|
"1. Type !tip help to interact with our Tipbot which can be used to send and receive LBRY Credits (LBC). **Enable 2FA in your Discord account settings!** \n" +
|
||||||
"description": "[**spee.ch**](https://spee.ch) runs on top of the LBRY network - it's essentially an open source, censorship resistent and decentralized image and video sharing site with the added benefit of being a web-based (works on mobile too!) gateway into the LBRY network. spee.ch can be used to retrieve LBRY images/videos that are free by accessing them through a web browser. \nFor example, if content is located at lbry://loose-cannons-episode1#12c87bb42dd8832167b1e54edf72bbd37bc47622, you can view it on spee.ch at: https://spee.ch/12c87bb42dd8832167b1e54edf72bbd37bc47622/loose-cannons-episode1. You can also view channels on spee.ch, such as: https://spee.ch/@copchronicles:5c039dc7423657e59d78939df72c186e43273675 or https://spee.ch/@MinutePhysics:589276465a23c589801d874f484cc39f307d7ec7 \n\nspee.ch also allows you to create a channel to group your uploads and retreive them easily. These channels are separate from any you may have in the LBRY app since they exist on the spee.ch site via a login process. You can even share your channel name and password so that others can contribute to it.",
|
"2. See the Frequently Asked Questions (FAQ) section below prior to asking for help or information on LBRY \n" +
|
||||||
"url": "https://spee.ch/about",
|
"3. Backing up your LBRY wallet is your responsbility, see FAQ link below \n" +
|
||||||
"color": 7976557,
|
"4. You can find the LBRY Block explorer at https://explorer.lbry.io \n" +
|
||||||
"author": {
|
"5. Want to contribute more? Check out https://lbry.io/faq/contributing \n" +
|
||||||
"name": "spee.ch",
|
"6. Are you a dev? Check out the #dev channel \n" +
|
||||||
"url": "https://spee.ch",
|
"7. Want to share something you published? Post it on the #publishers channel \n",
|
||||||
"icon_url": "http://www.pd4pic.com/images/flag-green-blue-purple-indigo-bars-background.png"
|
color: 7976557,
|
||||||
}
|
author: {
|
||||||
|
name: "Helpful hints",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
msg.mentions.members.first().send({
|
||||||
|
embed: {
|
||||||
|
title: "*Click here for more info about LBRY!*",
|
||||||
|
description:
|
||||||
|
"[**LBRY**](https://lbry.io) is a protocol providing fully decentralized network for the discovery, distribution, and payment of data. It utilizes the [**LBRY blockchain**](https://lbry.io/what#the-network) as a global namespace and database of digital content. Blockchain entries contain searchable content metadata, identities, and rights and access rules. \n[_**Download the LBRY App here**_](https://lbry.io/get)",
|
||||||
|
url: "https://lbry.io/what",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "What is LBRY?",
|
||||||
|
url: "https://lbry.io/what",
|
||||||
|
icon_url: "https://i.imgur.com/yWf5USu.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
msg.mentions.members.first().send({
|
||||||
|
embed: {
|
||||||
|
title: "*Click here to see all LBRY Frequently Asked Questions (FAQ)!*",
|
||||||
|
description:
|
||||||
|
"Want to backup your LBRY wallet? [**Backup**](https://lbry.io/faq/how-to-backup-wallet) \nLooking for LBRY data? [**Behind the scenes files**](https://lbry.io/faq/lbry-directories) \nTrouble starting LBRY? [**Startup troubleshooting**](https://lbry.io/faq/startup-troubleshooting) \nNeed help finding your log files (will help us troubleshoot!)? [**Find logs**](https://lbry.io/faq/how-to-find-lbry-log-file) \nNot able to stream any content? [**Troublshoot streaming**](https://lbry.io/faq/unable-to-stream)\nNeed help with publishing? [**How to Publish**](https://lbry.io/faq/how-to-publish) \nWant more LBRY Credits (LBC)? [**Get LBC**](https://lbry.io/faq/earn-credits) \nLooking for referral information? [**Referrals**](https://lbry.io/faq/referrals)",
|
||||||
|
url: "https://lbry.io/faq",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "LBRY FAQ",
|
||||||
|
url: "https://lbry.io/faq",
|
||||||
|
icon_url: "https://spee.ch/8/Id5Qoc3w.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
msg.mentions.members.first().send({
|
||||||
|
embed: {
|
||||||
|
title: "*Have you checked out spee.ch yet?!*",
|
||||||
|
description:
|
||||||
|
"[**spee.ch**](https://spee.ch) runs on top of the LBRY network - it's essentially an open source, censorship resistent and decentralized image and video sharing site with the added benefit of being a web-based (works on mobile too!) gateway into the LBRY network. spee.ch can be used to retrieve LBRY images/videos that are free by accessing them through a web browser. \nFor example, if content is located at lbry://loose-cannons-episode1#12c87bb42dd8832167b1e54edf72bbd37bc47622, you can view it on spee.ch at: https://spee.ch/12c87bb42dd8832167b1e54edf72bbd37bc47622/loose-cannons-episode1. You can also view channels on spee.ch, such as: https://spee.ch/@copchronicles:5c039dc7423657e59d78939df72c186e43273675 or https://spee.ch/@MinutePhysics:589276465a23c589801d874f484cc39f307d7ec7 \n\nspee.ch also allows you to create a channel to group your uploads and retreive them easily. These channels are separate from any you may have in the LBRY app since they exist on the spee.ch site via a login process. You can even share your channel name and password so that others can contribute to it.",
|
||||||
|
url: "https://spee.ch/about",
|
||||||
|
color: 7976557,
|
||||||
|
author: {
|
||||||
|
name: "spee.ch",
|
||||||
|
url: "https://spee.ch",
|
||||||
|
icon_url:
|
||||||
|
"http://www.pd4pic.com/images/flag-green-blue-purple-indigo-bars-background.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
const fs = require("fs"),
|
const fs = require("fs"),
|
||||||
path = require("path");
|
path = require("path");
|
||||||
|
@ -33,7 +33,7 @@ function load_plugins() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("custom" in plugin){
|
if ("custom" in plugin) {
|
||||||
for (let j = 0; j < plugin.custom.length; j++) {
|
for (let j = 0; j < plugin.custom.length; j++) {
|
||||||
if (plugin.custom[j] in plugin) {
|
if (plugin.custom[j] in plugin) {
|
||||||
dbot.addCustomFunc(plugin[plugin.custom[j]]);
|
dbot.addCustomFunc(plugin[plugin.custom[j]]);
|
||||||
|
@ -43,5 +43,9 @@ function load_plugins() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(`Loaded ${dbot.commandCount()} chat commands and ${otherFunc} custom functions.`);
|
console.log(
|
||||||
|
`Loaded ${dbot.commandCount()} chat commands and ${
|
||||||
|
otherFunc
|
||||||
|
} custom functions.`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,13 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prettier": "prettier * --write",
|
"prettier": "prettier * --write",
|
||||||
"build": "babel bot -d dist",
|
"build": "babel bot -d dist",
|
||||||
"prod": "babel bot -d dist & node dist/bot.js"
|
"prod": "babel bot -d dist & node dist/bot.js",
|
||||||
|
"lint": "prettier --write bot/**/*.js",
|
||||||
|
"precommit": "lint"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "1.7.4"
|
"husky": "^0.14.3",
|
||||||
|
"prettier": "1.8.1"
|
||||||
},
|
},
|
||||||
"name": "wunderbot-discord",
|
"name": "wunderbot-discord",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
|
483
yarn.lock
483
yarn.lock
|
@ -26,14 +26,28 @@ ajv@^5.1.0:
|
||||||
json-schema-traverse "^0.3.0"
|
json-schema-traverse "^0.3.0"
|
||||||
json-stable-stringify "^1.0.1"
|
json-stable-stringify "^1.0.1"
|
||||||
|
|
||||||
|
ansi-escapes@^1.0.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
|
||||||
|
|
||||||
ansi-regex@^2.0.0:
|
ansi-regex@^2.0.0:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
|
||||||
|
|
||||||
|
ansi-regex@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||||
|
|
||||||
ansi-styles@^2.2.1:
|
ansi-styles@^2.2.1:
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
|
||||||
|
|
||||||
|
ansi-styles@^3.1.0, ansi-styles@^3.2.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
|
||||||
|
dependencies:
|
||||||
|
color-convert "^1.9.0"
|
||||||
|
|
||||||
anymatch@^1.3.0:
|
anymatch@^1.3.0:
|
||||||
version "1.3.2"
|
version "1.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
|
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
|
||||||
|
@ -41,6 +55,10 @@ anymatch@^1.3.0:
|
||||||
micromatch "^2.1.5"
|
micromatch "^2.1.5"
|
||||||
normalize-path "^2.0.0"
|
normalize-path "^2.0.0"
|
||||||
|
|
||||||
|
app-root-path@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46"
|
||||||
|
|
||||||
aproba@^1.0.3:
|
aproba@^1.0.3:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
|
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
|
||||||
|
@ -52,6 +70,12 @@ are-we-there-yet@~1.1.2:
|
||||||
delegates "^1.0.0"
|
delegates "^1.0.0"
|
||||||
readable-stream "^2.0.6"
|
readable-stream "^2.0.6"
|
||||||
|
|
||||||
|
argparse@^1.0.7:
|
||||||
|
version "1.0.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
|
||||||
|
dependencies:
|
||||||
|
sprintf-js "~1.0.2"
|
||||||
|
|
||||||
arr-diff@^2.0.0:
|
arr-diff@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
|
||||||
|
@ -469,7 +493,7 @@ caseless@~0.12.0:
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||||
|
|
||||||
chalk@^1.1.3:
|
chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -479,6 +503,14 @@ chalk@^1.1.3:
|
||||||
strip-ansi "^3.0.0"
|
strip-ansi "^3.0.0"
|
||||||
supports-color "^2.0.0"
|
supports-color "^2.0.0"
|
||||||
|
|
||||||
|
chalk@^2.0.1, chalk@^2.1.0:
|
||||||
|
version "2.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^3.1.0"
|
||||||
|
escape-string-regexp "^1.0.5"
|
||||||
|
supports-color "^4.0.0"
|
||||||
|
|
||||||
chokidar@^1.6.1:
|
chokidar@^1.6.1:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
|
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
|
||||||
|
@ -500,10 +532,31 @@ chrono-node@^1.3.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
moment "^2.10.3"
|
moment "^2.10.3"
|
||||||
|
|
||||||
|
ci-info@^1.0.0:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a"
|
||||||
|
|
||||||
cjson@~0.2.1:
|
cjson@~0.2.1:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/cjson/-/cjson-0.2.1.tgz#73cd8aad65d9e1505f9af1744d3b79c1527682a5"
|
resolved "https://registry.yarnpkg.com/cjson/-/cjson-0.2.1.tgz#73cd8aad65d9e1505f9af1744d3b79c1527682a5"
|
||||||
|
|
||||||
|
cli-cursor@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
|
||||||
|
dependencies:
|
||||||
|
restore-cursor "^1.0.1"
|
||||||
|
|
||||||
|
cli-spinners@^0.1.2:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
|
||||||
|
|
||||||
|
cli-truncate@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
|
||||||
|
dependencies:
|
||||||
|
slice-ansi "0.0.4"
|
||||||
|
string-width "^1.0.1"
|
||||||
|
|
||||||
co@^4.6.0:
|
co@^4.6.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||||
|
@ -512,6 +565,16 @@ code-point-at@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
|
|
||||||
|
color-convert@^1.9.0:
|
||||||
|
version "1.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
|
||||||
|
dependencies:
|
||||||
|
color-name "^1.1.1"
|
||||||
|
|
||||||
|
color-name@^1.1.1:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||||
|
|
||||||
colors@0.5.x:
|
colors@0.5.x:
|
||||||
version "0.5.1"
|
version "0.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774"
|
resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774"
|
||||||
|
@ -522,7 +585,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream "~1.0.0"
|
delayed-stream "~1.0.0"
|
||||||
|
|
||||||
commander@^2.11.0:
|
commander@^2.11.0, commander@^2.9.0:
|
||||||
version "2.11.0"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||||
|
|
||||||
|
@ -553,6 +616,27 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
|
||||||
|
cosmiconfig@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-1.1.0.tgz#0dea0f9804efdfb929fbb1b188e25553ea053d37"
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.1.2"
|
||||||
|
js-yaml "^3.4.3"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
object-assign "^4.0.1"
|
||||||
|
os-homedir "^1.0.1"
|
||||||
|
parse-json "^2.2.0"
|
||||||
|
pinkie-promise "^2.0.0"
|
||||||
|
require-from-string "^1.1.0"
|
||||||
|
|
||||||
|
cross-spawn@^5.0.1:
|
||||||
|
version "5.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^4.0.1"
|
||||||
|
shebang-command "^1.2.0"
|
||||||
|
which "^1.2.9"
|
||||||
|
|
||||||
cryptiles@2.x.x:
|
cryptiles@2.x.x:
|
||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
|
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
|
||||||
|
@ -571,6 +655,10 @@ dashdash@^1.12.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
|
|
||||||
|
date-fns@^1.27.2:
|
||||||
|
version "1.29.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
|
||||||
|
|
||||||
debug@^2.2.0, debug@^2.6.8, debug@^2.6.9:
|
debug@^2.2.0, debug@^2.6.8, debug@^2.6.9:
|
||||||
version "2.6.9"
|
version "2.6.9"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||||
|
@ -615,15 +703,25 @@ ecc-jsbn@~0.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
jsbn "~0.1.0"
|
jsbn "~0.1.0"
|
||||||
|
|
||||||
|
elegant-spinner@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
|
||||||
|
|
||||||
embed-creator@^1.1.4:
|
embed-creator@^1.1.4:
|
||||||
version "1.1.4"
|
version "1.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/embed-creator/-/embed-creator-1.1.4.tgz#7f8a783db6ae384d029e746837d65553e6ff0f9e"
|
resolved "https://registry.yarnpkg.com/embed-creator/-/embed-creator-1.1.4.tgz#7f8a783db6ae384d029e746837d65553e6ff0f9e"
|
||||||
|
|
||||||
|
error-ex@^1.2.0:
|
||||||
|
version "1.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
|
||||||
|
dependencies:
|
||||||
|
is-arrayish "^0.2.1"
|
||||||
|
|
||||||
es6-promise@3.2.1:
|
es6-promise@3.2.1:
|
||||||
version "3.2.1"
|
version "3.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4"
|
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4"
|
||||||
|
|
||||||
escape-string-regexp@^1.0.2:
|
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||||
|
|
||||||
|
@ -653,6 +751,10 @@ esprima@1.2.2:
|
||||||
version "1.2.2"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.2.tgz#76a0fd66fcfe154fd292667dc264019750b1657b"
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.2.tgz#76a0fd66fcfe154fd292667dc264019750b1657b"
|
||||||
|
|
||||||
|
esprima@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
|
||||||
|
|
||||||
estraverse@~0.0.4:
|
estraverse@~0.0.4:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-0.0.4.tgz#01a0932dfee574684a598af5a67c3bf9b6428db2"
|
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-0.0.4.tgz#01a0932dfee574684a598af5a67c3bf9b6428db2"
|
||||||
|
@ -665,6 +767,22 @@ esutils@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
||||||
|
|
||||||
|
execa@^0.8.0:
|
||||||
|
version "0.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
|
||||||
|
dependencies:
|
||||||
|
cross-spawn "^5.0.1"
|
||||||
|
get-stream "^3.0.0"
|
||||||
|
is-stream "^1.1.0"
|
||||||
|
npm-run-path "^2.0.0"
|
||||||
|
p-finally "^1.0.0"
|
||||||
|
signal-exit "^3.0.0"
|
||||||
|
strip-eof "^1.0.0"
|
||||||
|
|
||||||
|
exit-hook@^1.0.0:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
|
||||||
|
|
||||||
expand-brackets@^0.1.4:
|
expand-brackets@^0.1.4:
|
||||||
version "0.1.5"
|
version "0.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
||||||
|
@ -695,6 +813,13 @@ fast-deep-equal@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
|
||||||
|
|
||||||
|
figures@^1.7.0:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp "^1.0.5"
|
||||||
|
object-assign "^4.1.0"
|
||||||
|
|
||||||
filename-regex@^2.0.0:
|
filename-regex@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
||||||
|
@ -784,6 +909,14 @@ gauge@~2.7.3:
|
||||||
strip-ansi "^3.0.1"
|
strip-ansi "^3.0.1"
|
||||||
wide-align "^1.1.0"
|
wide-align "^1.1.0"
|
||||||
|
|
||||||
|
get-own-enumerable-property-symbols@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b"
|
||||||
|
|
||||||
|
get-stream@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||||
|
|
||||||
getpass@^0.1.1:
|
getpass@^0.1.1:
|
||||||
version "0.1.7"
|
version "0.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
|
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
|
||||||
|
@ -850,6 +983,10 @@ has-ansi@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^2.0.0"
|
ansi-regex "^2.0.0"
|
||||||
|
|
||||||
|
has-flag@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
||||||
|
|
||||||
has-unicode@^2.0.0:
|
has-unicode@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||||
|
@ -907,6 +1044,24 @@ http-signature@~1.2.0:
|
||||||
jsprim "^1.2.2"
|
jsprim "^1.2.2"
|
||||||
sshpk "^1.7.0"
|
sshpk "^1.7.0"
|
||||||
|
|
||||||
|
husky@^0.14.3:
|
||||||
|
version "0.14.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3"
|
||||||
|
dependencies:
|
||||||
|
is-ci "^1.0.10"
|
||||||
|
normalize-path "^1.0.0"
|
||||||
|
strip-indent "^2.0.0"
|
||||||
|
|
||||||
|
indent-string@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
|
||||||
|
dependencies:
|
||||||
|
repeating "^2.0.0"
|
||||||
|
|
||||||
|
indent-string@^3.0.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inflight@^1.0.4:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
|
@ -928,6 +1083,10 @@ invariant@^2.2.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify "^1.0.0"
|
loose-envify "^1.0.0"
|
||||||
|
|
||||||
|
is-arrayish@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
||||||
|
|
||||||
is-binary-path@^1.0.0:
|
is-binary-path@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
|
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
|
||||||
|
@ -938,6 +1097,12 @@ is-buffer@^1.1.5:
|
||||||
version "1.1.5"
|
version "1.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
|
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
|
||||||
|
|
||||||
|
is-ci@^1.0.10:
|
||||||
|
version "1.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
|
||||||
|
dependencies:
|
||||||
|
ci-info "^1.0.0"
|
||||||
|
|
||||||
is-dotfile@^1.0.0:
|
is-dotfile@^1.0.0:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
|
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
|
||||||
|
@ -956,6 +1121,10 @@ is-extglob@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
|
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
|
||||||
|
|
||||||
|
is-extglob@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||||
|
|
||||||
is-finite@^1.0.0:
|
is-finite@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
|
resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
|
||||||
|
@ -974,6 +1143,12 @@ is-glob@^2.0.0, is-glob@^2.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^1.0.0"
|
is-extglob "^1.0.0"
|
||||||
|
|
||||||
|
is-glob@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
|
||||||
|
dependencies:
|
||||||
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
is-number@^2.1.0:
|
is-number@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
|
||||||
|
@ -986,6 +1161,10 @@ is-number@^3.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
kind-of "^3.0.2"
|
kind-of "^3.0.2"
|
||||||
|
|
||||||
|
is-obj@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
|
||||||
|
|
||||||
is-posix-bracket@^0.1.0:
|
is-posix-bracket@^0.1.0:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
|
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
|
||||||
|
@ -994,6 +1173,18 @@ is-primitive@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
|
resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
|
||||||
|
|
||||||
|
is-promise@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
|
||||||
|
|
||||||
|
is-regexp@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
|
||||||
|
|
||||||
|
is-stream@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||||
|
|
||||||
is-typedarray@~1.0.0:
|
is-typedarray@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
||||||
|
@ -1002,6 +1193,10 @@ isarray@1.0.0, isarray@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
|
||||||
|
isexe@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
isobject@^2.0.0:
|
isobject@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
|
resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
|
||||||
|
@ -1012,6 +1207,19 @@ isstream@~0.1.2:
|
||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||||
|
|
||||||
|
jest-get-type@^21.2.0:
|
||||||
|
version "21.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23"
|
||||||
|
|
||||||
|
jest-validate@^21.1.0:
|
||||||
|
version "21.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7"
|
||||||
|
dependencies:
|
||||||
|
chalk "^2.0.1"
|
||||||
|
jest-get-type "^21.2.0"
|
||||||
|
leven "^2.1.0"
|
||||||
|
pretty-format "^21.2.1"
|
||||||
|
|
||||||
jison-lex@0.2.x:
|
jison-lex@0.2.x:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/jison-lex/-/jison-lex-0.2.1.tgz#ac4b815e8cce5132eb12b5dfcfe8d707b8844dfe"
|
resolved "https://registry.yarnpkg.com/jison-lex/-/jison-lex-0.2.1.tgz#ac4b815e8cce5132eb12b5dfcfe8d707b8844dfe"
|
||||||
|
@ -1036,6 +1244,13 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
|
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
|
||||||
|
|
||||||
|
js-yaml@^3.4.3:
|
||||||
|
version "3.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
|
||||||
|
dependencies:
|
||||||
|
argparse "^1.0.7"
|
||||||
|
esprima "^4.0.0"
|
||||||
|
|
||||||
jsbn@~0.1.0:
|
jsbn@~0.1.0:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
|
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
|
||||||
|
@ -1108,10 +1323,81 @@ kind-of@^4.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-buffer "^1.1.5"
|
is-buffer "^1.1.5"
|
||||||
|
|
||||||
|
leven@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580"
|
||||||
|
|
||||||
lex-parser@0.1.x, lex-parser@~0.1.3:
|
lex-parser@0.1.x, lex-parser@~0.1.3:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/lex-parser/-/lex-parser-0.1.4.tgz#64c4f025f17fd53bfb45763faeb16f015a747550"
|
resolved "https://registry.yarnpkg.com/lex-parser/-/lex-parser-0.1.4.tgz#64c4f025f17fd53bfb45763faeb16f015a747550"
|
||||||
|
|
||||||
|
lint-staged@^4.3.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.3.0.tgz#ed0779ad9a42c0dc62bb3244e522870b41125879"
|
||||||
|
dependencies:
|
||||||
|
app-root-path "^2.0.0"
|
||||||
|
chalk "^2.1.0"
|
||||||
|
commander "^2.11.0"
|
||||||
|
cosmiconfig "^1.1.0"
|
||||||
|
execa "^0.8.0"
|
||||||
|
is-glob "^4.0.0"
|
||||||
|
jest-validate "^21.1.0"
|
||||||
|
listr "^0.12.0"
|
||||||
|
lodash "^4.17.4"
|
||||||
|
log-symbols "^2.0.0"
|
||||||
|
minimatch "^3.0.0"
|
||||||
|
npm-which "^3.0.1"
|
||||||
|
p-map "^1.1.1"
|
||||||
|
staged-git-files "0.0.4"
|
||||||
|
stringify-object "^3.2.0"
|
||||||
|
|
||||||
|
listr-silent-renderer@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e"
|
||||||
|
|
||||||
|
listr-update-renderer@^0.2.0:
|
||||||
|
version "0.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.1.3"
|
||||||
|
cli-truncate "^0.2.1"
|
||||||
|
elegant-spinner "^1.0.1"
|
||||||
|
figures "^1.7.0"
|
||||||
|
indent-string "^3.0.0"
|
||||||
|
log-symbols "^1.0.2"
|
||||||
|
log-update "^1.0.2"
|
||||||
|
strip-ansi "^3.0.1"
|
||||||
|
|
||||||
|
listr-verbose-renderer@^0.4.0:
|
||||||
|
version "0.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.1.3"
|
||||||
|
cli-cursor "^1.0.2"
|
||||||
|
date-fns "^1.27.2"
|
||||||
|
figures "^1.7.0"
|
||||||
|
|
||||||
|
listr@^0.12.0:
|
||||||
|
version "0.12.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.1.3"
|
||||||
|
cli-truncate "^0.2.1"
|
||||||
|
figures "^1.7.0"
|
||||||
|
indent-string "^2.1.0"
|
||||||
|
is-promise "^2.1.0"
|
||||||
|
is-stream "^1.1.0"
|
||||||
|
listr-silent-renderer "^1.1.1"
|
||||||
|
listr-update-renderer "^0.2.0"
|
||||||
|
listr-verbose-renderer "^0.4.0"
|
||||||
|
log-symbols "^1.0.2"
|
||||||
|
log-update "^1.0.2"
|
||||||
|
ora "^0.2.3"
|
||||||
|
p-map "^1.1.1"
|
||||||
|
rxjs "^5.0.0-beta.11"
|
||||||
|
stream-to-observable "^0.1.0"
|
||||||
|
strip-ansi "^3.0.1"
|
||||||
|
|
||||||
lodash.some@^4.6.0:
|
lodash.some@^4.6.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
|
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
|
||||||
|
@ -1120,6 +1406,25 @@ lodash@^4.14.0, lodash@^4.17.4:
|
||||||
version "4.17.4"
|
version "4.17.4"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
||||||
|
|
||||||
|
log-symbols@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.0.0"
|
||||||
|
|
||||||
|
log-symbols@^2.0.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.1.0.tgz#f35fa60e278832b538dc4dddcbb478a45d3e3be6"
|
||||||
|
dependencies:
|
||||||
|
chalk "^2.0.1"
|
||||||
|
|
||||||
|
log-update@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1"
|
||||||
|
dependencies:
|
||||||
|
ansi-escapes "^1.0.0"
|
||||||
|
cli-cursor "^1.0.2"
|
||||||
|
|
||||||
long@^3.2.0:
|
long@^3.2.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
|
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
|
||||||
|
@ -1130,6 +1435,13 @@ loose-envify@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
js-tokens "^3.0.0"
|
js-tokens "^3.0.0"
|
||||||
|
|
||||||
|
lru-cache@^4.0.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
|
||||||
|
dependencies:
|
||||||
|
pseudomap "^1.0.2"
|
||||||
|
yallist "^2.1.2"
|
||||||
|
|
||||||
micromatch@^2.1.5:
|
micromatch@^2.1.5:
|
||||||
version "2.3.11"
|
version "2.3.11"
|
||||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
|
||||||
|
@ -1276,12 +1588,36 @@ nopt@^4.0.1:
|
||||||
abbrev "1"
|
abbrev "1"
|
||||||
osenv "^0.1.4"
|
osenv "^0.1.4"
|
||||||
|
|
||||||
|
normalize-path@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379"
|
||||||
|
|
||||||
normalize-path@^2.0.0, normalize-path@^2.0.1:
|
normalize-path@^2.0.0, normalize-path@^2.0.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
|
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
|
||||||
dependencies:
|
dependencies:
|
||||||
remove-trailing-separator "^1.0.1"
|
remove-trailing-separator "^1.0.1"
|
||||||
|
|
||||||
|
npm-path@^2.0.2:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe"
|
||||||
|
dependencies:
|
||||||
|
which "^1.2.10"
|
||||||
|
|
||||||
|
npm-run-path@^2.0.0:
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
|
||||||
|
dependencies:
|
||||||
|
path-key "^2.0.0"
|
||||||
|
|
||||||
|
npm-which@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa"
|
||||||
|
dependencies:
|
||||||
|
commander "^2.9.0"
|
||||||
|
npm-path "^2.0.2"
|
||||||
|
which "^1.2.10"
|
||||||
|
|
||||||
npmlog@^4.0.2:
|
npmlog@^4.0.2:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
||||||
|
@ -1303,7 +1639,7 @@ oauth-sign@~0.8.1, oauth-sign@~0.8.2:
|
||||||
version "0.8.2"
|
version "0.8.2"
|
||||||
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
|
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
|
||||||
|
|
||||||
object-assign@^4.1.0:
|
object-assign@^4.0.1, object-assign@^4.1.0:
|
||||||
version "4.1.1"
|
version "4.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||||
|
|
||||||
|
@ -1320,7 +1656,20 @@ once@^1.3.0, once@^1.3.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
os-homedir@1.0.2, os-homedir@^1.0.0:
|
onetime@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
|
||||||
|
|
||||||
|
ora@^0.2.3:
|
||||||
|
version "0.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4"
|
||||||
|
dependencies:
|
||||||
|
chalk "^1.1.1"
|
||||||
|
cli-cursor "^1.0.2"
|
||||||
|
cli-spinners "^0.1.2"
|
||||||
|
object-assign "^4.0.1"
|
||||||
|
|
||||||
|
os-homedir@1.0.2, os-homedir@^1.0.0, os-homedir@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
||||||
|
|
||||||
|
@ -1343,6 +1692,14 @@ output-file-sync@^1.1.2:
|
||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
object-assign "^4.1.0"
|
object-assign "^4.1.0"
|
||||||
|
|
||||||
|
p-finally@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||||
|
|
||||||
|
p-map@^1.1.1:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
|
||||||
|
|
||||||
parse-glob@^3.0.4:
|
parse-glob@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
|
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
|
||||||
|
@ -1352,10 +1709,20 @@ parse-glob@^3.0.4:
|
||||||
is-extglob "^1.0.0"
|
is-extglob "^1.0.0"
|
||||||
is-glob "^2.0.0"
|
is-glob "^2.0.0"
|
||||||
|
|
||||||
|
parse-json@^2.2.0:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
|
||||||
|
dependencies:
|
||||||
|
error-ex "^1.2.0"
|
||||||
|
|
||||||
path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
|
path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
path-key@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
|
||||||
|
|
||||||
performance-now@^0.2.0:
|
performance-now@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
|
||||||
|
@ -1364,13 +1731,30 @@ performance-now@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
|
|
||||||
|
pinkie-promise@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
|
||||||
|
dependencies:
|
||||||
|
pinkie "^2.0.0"
|
||||||
|
|
||||||
|
pinkie@^2.0.0:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
||||||
|
|
||||||
preserve@^0.2.0:
|
preserve@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||||
|
|
||||||
prettier@1.7.4:
|
prettier@1.8.1:
|
||||||
version "1.7.4"
|
version "1.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.1.tgz#91064d778c08c85ac1cbe6b23195c34310d039f9"
|
||||||
|
|
||||||
|
pretty-format@^21.2.1:
|
||||||
|
version "21.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36"
|
||||||
|
dependencies:
|
||||||
|
ansi-regex "^3.0.0"
|
||||||
|
ansi-styles "^3.2.0"
|
||||||
|
|
||||||
prism-media@^0.0.1:
|
prism-media@^0.0.1:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
|
@ -1384,6 +1768,10 @@ process-nextick-args@~1.0.6:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
||||||
|
|
||||||
|
pseudomap@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
||||||
|
|
||||||
punycode@^1.4.1:
|
punycode@^1.4.1:
|
||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
|
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
|
||||||
|
@ -1535,6 +1923,10 @@ request@^2.83.0:
|
||||||
tunnel-agent "^0.6.0"
|
tunnel-agent "^0.6.0"
|
||||||
uuid "^3.1.0"
|
uuid "^3.1.0"
|
||||||
|
|
||||||
|
require-from-string@^1.1.0:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418"
|
||||||
|
|
||||||
require_optional@~1.0.0:
|
require_optional@~1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e"
|
resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e"
|
||||||
|
@ -1546,12 +1938,25 @@ resolve-from@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
|
||||||
|
|
||||||
|
restore-cursor@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
|
||||||
|
dependencies:
|
||||||
|
exit-hook "^1.0.0"
|
||||||
|
onetime "^1.0.0"
|
||||||
|
|
||||||
rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1:
|
rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.5"
|
glob "^7.0.5"
|
||||||
|
|
||||||
|
rxjs@^5.0.0-beta.11:
|
||||||
|
version "5.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3"
|
||||||
|
dependencies:
|
||||||
|
symbol-observable "^1.0.1"
|
||||||
|
|
||||||
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
@ -1568,6 +1973,16 @@ set-immediate-shim@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
|
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
|
||||||
|
|
||||||
|
shebang-command@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
|
||||||
|
dependencies:
|
||||||
|
shebang-regex "^1.0.0"
|
||||||
|
|
||||||
|
shebang-regex@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
|
||||||
|
|
||||||
signal-exit@^3.0.0:
|
signal-exit@^3.0.0:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||||
|
@ -1576,6 +1991,10 @@ slash@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
|
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
|
||||||
|
|
||||||
|
slice-ansi@0.0.4:
|
||||||
|
version "0.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
||||||
|
|
||||||
sliced@0.0.5:
|
sliced@0.0.5:
|
||||||
version "0.0.5"
|
version "0.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/sliced/-/sliced-0.0.5.tgz#5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f"
|
resolved "https://registry.yarnpkg.com/sliced/-/sliced-0.0.5.tgz#5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f"
|
||||||
|
@ -1614,6 +2033,10 @@ source-map@^0.5.6:
|
||||||
version "0.5.7"
|
version "0.5.7"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||||
|
|
||||||
|
sprintf-js@~1.0.2:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
|
|
||||||
sshpk@^1.7.0:
|
sshpk@^1.7.0:
|
||||||
version "1.13.1"
|
version "1.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
||||||
|
@ -1628,12 +2051,20 @@ sshpk@^1.7.0:
|
||||||
jsbn "~0.1.0"
|
jsbn "~0.1.0"
|
||||||
tweetnacl "~0.14.0"
|
tweetnacl "~0.14.0"
|
||||||
|
|
||||||
|
staged-git-files@0.0.4:
|
||||||
|
version "0.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35"
|
||||||
|
|
||||||
static-eval@0.2.3:
|
static-eval@0.2.3:
|
||||||
version "0.2.3"
|
version "0.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-0.2.3.tgz#023f17ac9fee426ea788c12ea39206dc175f8b2a"
|
resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-0.2.3.tgz#023f17ac9fee426ea788c12ea39206dc175f8b2a"
|
||||||
dependencies:
|
dependencies:
|
||||||
escodegen "~0.0.24"
|
escodegen "~0.0.24"
|
||||||
|
|
||||||
|
stream-to-observable@^0.1.0:
|
||||||
|
version "0.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe"
|
||||||
|
|
||||||
string-width@^1.0.1, string-width@^1.0.2:
|
string-width@^1.0.1, string-width@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
||||||
|
@ -1648,6 +2079,14 @@ string_decoder@~1.0.0, string_decoder@~1.0.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "~5.1.0"
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
|
stringify-object@^3.2.0:
|
||||||
|
version "3.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.1.tgz#2720c2eff940854c819f6ee252aaeb581f30624d"
|
||||||
|
dependencies:
|
||||||
|
get-own-enumerable-property-symbols "^2.0.1"
|
||||||
|
is-obj "^1.0.1"
|
||||||
|
is-regexp "^1.0.0"
|
||||||
|
|
||||||
stringstream@~0.0.4, stringstream@~0.0.5:
|
stringstream@~0.0.4, stringstream@~0.0.5:
|
||||||
version "0.0.5"
|
version "0.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
|
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
|
||||||
|
@ -1658,6 +2097,14 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^2.0.0"
|
ansi-regex "^2.0.0"
|
||||||
|
|
||||||
|
strip-eof@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
|
||||||
|
|
||||||
|
strip-indent@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
|
||||||
|
|
||||||
strip-json-comments@~2.0.1:
|
strip-json-comments@~2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||||
|
@ -1666,6 +2113,16 @@ supports-color@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||||
|
|
||||||
|
supports-color@^4.0.0:
|
||||||
|
version "4.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
|
||||||
|
dependencies:
|
||||||
|
has-flag "^2.0.0"
|
||||||
|
|
||||||
|
symbol-observable@^1.0.1:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
||||||
|
|
||||||
tar-pack@^3.4.0:
|
tar-pack@^3.4.0:
|
||||||
version "3.4.0"
|
version "3.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984"
|
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984"
|
||||||
|
@ -1757,6 +2214,12 @@ verror@1.10.0:
|
||||||
core-util-is "1.0.2"
|
core-util-is "1.0.2"
|
||||||
extsprintf "^1.2.0"
|
extsprintf "^1.2.0"
|
||||||
|
|
||||||
|
which@^1.2.10, which@^1.2.9:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
wide-align@^1.1.0:
|
wide-align@^1.1.0:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
|
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
|
||||||
|
@ -1774,3 +2237,7 @@ ws@^3.1.0:
|
||||||
async-limiter "~1.0.0"
|
async-limiter "~1.0.0"
|
||||||
safe-buffer "~5.1.0"
|
safe-buffer "~5.1.0"
|
||||||
ultron "~1.1.0"
|
ultron "~1.1.0"
|
||||||
|
|
||||||
|
yallist@^2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
||||||
|
|
Loading…
Add table
Reference in a new issue