removed trigger on message edits

upgraded packages
This commit is contained in:
Niko Storni 2017-11-23 01:33:04 +01:00
parent 59b66dc12a
commit a199564da6
3 changed files with 73 additions and 51 deletions

View file

@ -96,9 +96,9 @@ function checkMessageForCommand(msg, isEdit) {
} }
bot.on("message", msg => checkMessageForCommand(msg, false)); bot.on("message", msg => checkMessageForCommand(msg, false));
bot.on("messageUpdate", (oldMessage, newMessage) => { /*bot.on("messageUpdate", (oldMessage, newMessage) => {
checkMessageForCommand(newMessage, true); checkMessageForCommand(newMessage, true);
}); });*/
exports.addCommand = function(commandName, commandObject) { exports.addCommand = function(commandName, commandObject) {
try { try {
@ -118,4 +118,4 @@ exports.commandCount = function() {
return Object.keys(commands).length; return Object.keys(commands).length;
}; };
bot.login(config.token); bot.login(config.token);

View file

@ -17,16 +17,18 @@
"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": "prettier --write bot/**/*.js"
}, },
"devDependencies": { "devDependencies": {
"prettier": "1.7.4" "prettier": "1.7.4"
}, },
"name": "wunderbot-discord", "name": "lbry-tipbot",
"version": "0.0.1", "version": "0.0.2",
"description": "LBRYs bot for Discord", "description": "LBRYs tipbot for Discord",
"main": "app.js", "main": "app.js",
"repository": "https://github.com/filipnyquist/wunderbot-disc", "repository": "https://github.com/lbryio/lbry-tipbot",
"author": "filipnyquist <filip@lbry.io>", "author": "filipnyquist <filip@lbry.io>",
"license": "MIT" "license": "MIT"
} }

106
yarn.lock
View file

@ -2,6 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"@types/node@^7.0.48":
version "7.0.48"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.48.tgz#24bfdc0aa82e8f6dbd017159c58094a2e06d0abb"
JSONSelect@0.4.0: JSONSelect@0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.yarnpkg.com/JSONSelect/-/JSONSelect-0.4.0.tgz#a08edcc67eb3fcbe99ed630855344a0cf282bb8d" resolved "https://registry.yarnpkg.com/JSONSelect/-/JSONSelect-0.4.0.tgz#a08edcc67eb3fcbe99ed630855344a0cf282bb8d"
@ -18,13 +22,13 @@ ajv@^4.9.1:
json-stable-stringify "^1.0.1" json-stable-stringify "^1.0.1"
ajv@^5.1.0: ajv@^5.1.0:
version "5.2.3" version "5.4.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.4.0.tgz#32d1cf08dbc80c432f426f12e10b2511f6b46474"
dependencies: dependencies:
co "^4.6.0" co "^4.6.0"
fast-deep-equal "^1.0.0" fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0" json-schema-traverse "^0.3.0"
json-stable-stringify "^1.0.1"
ansi-regex@^2.0.0: ansi-regex@^2.0.0:
version "2.1.1" version "2.1.1"
@ -407,8 +411,8 @@ bcrypt-pbkdf@^1.0.0:
tweetnacl "^0.14.3" tweetnacl "^0.14.3"
binary-extensions@^1.0.0: binary-extensions@^1.0.0:
version "1.10.0" version "1.11.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
bitcoin@^3.0.1: bitcoin@^3.0.1:
version "3.0.1" version "3.0.1"
@ -523,16 +527,18 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
delayed-stream "~1.0.0" delayed-stream "~1.0.0"
commander@^2.11.0: commander@^2.11.0:
version "2.11.0" version "2.12.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.0.tgz#2f13615c39c687a77926aa68ef25c099db1e72fb"
dependencies:
"@types/node" "^7.0.48"
concat-map@0.0.1: concat-map@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
config@^1.27.0: config@^1.27.0:
version "1.27.0" version "1.28.1"
resolved "https://registry.yarnpkg.com/config/-/config-1.27.0.tgz#3ab30d0080ff76f407c2f47ac1326adfd908af5f" resolved "https://registry.yarnpkg.com/config/-/config-1.28.1.tgz#7625d2a1e4c90f131d8a73347982d93c3873282d"
dependencies: dependencies:
json5 "0.4.0" json5 "0.4.0"
os-homedir "1.0.2" os-homedir "1.0.2"
@ -595,6 +601,10 @@ detect-indent@^4.0.0:
dependencies: dependencies:
repeating "^2.0.0" repeating "^2.0.0"
detect-libc@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
discord.js@^11.2.1: discord.js@^11.2.1:
version "11.2.1" version "11.2.1"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-11.2.1.tgz#bfc0f5a8b6398dc372d026e503592646456053fc" resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-11.2.1.tgz#bfc0f5a8b6398dc372d026e503592646456053fc"
@ -616,8 +626,8 @@ ecc-jsbn@~0.1.1:
jsbn "~0.1.0" jsbn "~0.1.0"
embed-creator@^1.1.4: embed-creator@^1.1.4:
version "1.1.4" version "1.2.3"
resolved "https://registry.yarnpkg.com/embed-creator/-/embed-creator-1.1.4.tgz#7f8a783db6ae384d029e746837d65553e6ff0f9e" resolved "https://registry.yarnpkg.com/embed-creator/-/embed-creator-1.2.3.tgz#f122165d39f9ca35aed3ef7b7ae643e7dd856ea1"
es6-promise@3.2.1: es6-promise@3.2.1:
version "3.2.1" version "3.2.1"
@ -695,6 +705,10 @@ 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"
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
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"
@ -740,19 +754,19 @@ form-data@~2.3.1:
mime-types "^2.1.12" mime-types "^2.1.12"
fs-readdir-recursive@^1.0.0: fs-readdir-recursive@^1.0.0:
version "1.0.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27"
fs.realpath@^1.0.0: fs.realpath@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
fsevents@^1.0.0: fsevents@^1.0.0:
version "1.1.2" version "1.1.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8"
dependencies: dependencies:
nan "^2.3.0" nan "^2.3.0"
node-pre-gyp "^0.6.36" node-pre-gyp "^0.6.39"
fstream-ignore@^1.0.5: fstream-ignore@^1.0.5:
version "1.0.5" version "1.0.5"
@ -887,9 +901,9 @@ home-or-tmp@^2.0.0:
os-homedir "^1.0.0" os-homedir "^1.0.0"
os-tmpdir "^1.0.1" os-tmpdir "^1.0.1"
hooks-fixed@2.0.0: hooks-fixed@2.0.2:
version "2.0.0" version "2.0.2"
resolved "https://registry.yarnpkg.com/hooks-fixed/-/hooks-fixed-2.0.0.tgz#a01d894d52ac7f6599bbb1f63dfc9c411df70cba" resolved "https://registry.yarnpkg.com/hooks-fixed/-/hooks-fixed-2.0.2.tgz#20076daa07e77d8a6106883ce3f1722e051140b0"
http-signature@~1.1.0: http-signature@~1.1.0:
version "1.1.1" version "1.1.1"
@ -919,8 +933,8 @@ inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
ini@~1.3.0: ini@~1.3.0:
version "1.3.4" version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
invariant@^2.2.2: invariant@^2.2.2:
version "2.2.2" version "2.2.2"
@ -935,8 +949,8 @@ is-binary-path@^1.0.0:
binary-extensions "^1.0.0" binary-extensions "^1.0.0"
is-buffer@^1.1.5: is-buffer@^1.1.5:
version "1.1.5" version "1.1.6"
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.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
is-dotfile@^1.0.0: is-dotfile@^1.0.0:
version "1.0.3" version "1.0.3"
@ -1112,6 +1126,10 @@ 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"
lodash.get@4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
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"
@ -1179,8 +1197,8 @@ minimist@^1.2.0:
minimist "0.0.8" minimist "0.0.8"
moment@^2.10.3, moment@^2.19.1: moment@^2.10.3, moment@^2.19.1:
version "2.19.1" version "2.19.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167" resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe"
mongodb-core@2.1.17: mongodb-core@2.1.17:
version "2.1.17" version "2.1.17"
@ -1198,13 +1216,14 @@ mongodb@2.2.33:
readable-stream "2.2.7" readable-stream "2.2.7"
mongoose@^4.12.3: mongoose@^4.12.3:
version "4.12.3" version "4.13.4"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-4.12.3.tgz#7099bf8ce4945150001f4c2462e56c9e958ddcb9" resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-4.13.4.tgz#31afd5fe865911678adbc892c4d3f66d0a821dfb"
dependencies: dependencies:
async "2.1.4" async "2.1.4"
bson "~1.0.4" bson "~1.0.4"
hooks-fixed "2.0.0" hooks-fixed "2.0.2"
kareem "1.5.0" kareem "1.5.0"
lodash.get "4.4.2"
mongodb "2.2.33" mongodb "2.2.33"
mpath "0.3.0" mpath "0.3.0"
mpromise "0.5.5" mpromise "0.5.5"
@ -1240,17 +1259,18 @@ muri@1.3.0:
resolved "https://registry.yarnpkg.com/muri/-/muri-1.3.0.tgz#aeccf3db64c56aa7c5b34e00f95b7878527a4721" resolved "https://registry.yarnpkg.com/muri/-/muri-1.3.0.tgz#aeccf3db64c56aa7c5b34e00f95b7878527a4721"
nan@^2.3.0: nan@^2.3.0:
version "2.7.0" version "2.8.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a"
node-config@^0.0.2: node-config@^0.0.2:
version "0.0.2" version "0.0.2"
resolved "https://registry.yarnpkg.com/node-config/-/node-config-0.0.2.tgz#46b40dcfbcb0e66d46a15f81b54eac2130fb150d" resolved "https://registry.yarnpkg.com/node-config/-/node-config-0.0.2.tgz#46b40dcfbcb0e66d46a15f81b54eac2130fb150d"
node-pre-gyp@^0.6.36: node-pre-gyp@^0.6.39:
version "0.6.38" version "0.6.39"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.38.tgz#e92a20f83416415bb4086f6d1fb78b3da73d113d" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649"
dependencies: dependencies:
detect-libc "^1.0.2"
hawk "3.1.3" hawk "3.1.3"
mkdirp "^0.5.1" mkdirp "^0.5.1"
nopt "^4.0.1" nopt "^4.0.1"
@ -1585,8 +1605,8 @@ sliced@1.0.1:
resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41"
snekfetch@^3.3.0: snekfetch@^3.3.0:
version "3.5.2" version "3.5.8"
resolved "https://registry.yarnpkg.com/snekfetch/-/snekfetch-3.5.2.tgz#aec6f2a7d2c43b9ed942653d1074070a2c1cae50" resolved "https://registry.yarnpkg.com/snekfetch/-/snekfetch-3.5.8.tgz#4d4e539f8435352105e74c392f62f66740a27d6c"
sntp@1.x.x: sntp@1.x.x:
version "1.0.9" version "1.0.9"
@ -1595,8 +1615,8 @@ sntp@1.x.x:
hoek "2.x.x" hoek "2.x.x"
sntp@2.x.x: sntp@2.x.x:
version "2.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.0.2.tgz#5064110f0af85f7cfdb7d6b67a40028ce52b4b2b" resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
dependencies: dependencies:
hoek "4.x.x" hoek "4.x.x"
@ -1667,8 +1687,8 @@ supports-color@^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"
tar-pack@^3.4.0: tar-pack@^3.4.0:
version "3.4.0" version "3.4.1"
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.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"
dependencies: dependencies:
debug "^2.2.0" debug "^2.2.0"
fstream "^1.0.10" fstream "^1.0.10"
@ -1720,8 +1740,8 @@ uid-number@^0.0.6:
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
ultron@~1.1.0: ultron@~1.1.0:
version "1.1.0" version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
underscore@1.1.x: underscore@1.1.x:
version "1.1.7" version "1.1.7"
@ -1768,8 +1788,8 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
ws@^3.1.0: ws@^3.1.0:
version "3.2.0" version "3.3.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-3.2.0.tgz#d5d3d6b11aff71e73f808f40cc69d52bb6d4a185" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608"
dependencies: dependencies:
async-limiter "~1.0.0" async-limiter "~1.0.0"
safe-buffer "~5.1.0" safe-buffer "~5.1.0"