diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54e28c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +# (or other binary data) +build/Release +dist/ +.DS_Store + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# any config.json - don't want to overwrite someone's config +config.json +# error output file +error.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..a0b231e --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# MarkBot for Discord +This is a super rough prototype. A Markov chain bot using markov-strings. Just uploading here so it can run and generate training data. diff --git a/_start.bat b/_start.bat new file mode 100644 index 0000000..7512a7e --- /dev/null +++ b/_start.bat @@ -0,0 +1 @@ +npm start \ No newline at end of file diff --git a/_start.sh b/_start.sh new file mode 100644 index 0000000..9b12715 --- /dev/null +++ b/_start.sh @@ -0,0 +1,2 @@ +#!/bin/bash +npm start diff --git a/index.js b/index.js new file mode 100644 index 0000000..352612c --- /dev/null +++ b/index.js @@ -0,0 +1,161 @@ +const Discord = require('discord.js') //https://discord.js.org/#/docs/main/stable/general/welcome +const fs = require('fs') +const Markov = require('markov-strings') +const client = new Discord.Client() +const ZEROWIDTH_SPACE = String.fromCharCode(parseInt('200B', 16)) +const MAXMESSAGELENGTH = 2000 + +let guilds = [] +let connected = -1 +let GAME = 'GAME' +let BOTDESC = 'Amazing.' +let PREFIX = '! ' +let VOLUME +let inviteCmd = 'invite' +let commands = {} +let aliases = {} +let errors = [] + +let lastSeenMessageID = null +let fileObj = { + messages: [], + lastSeenMessageID: null +} + +let markovDB = [] +let messageCache = [] +const markovOpts = { + maxLength: 400, + minWords: 3, + minScore: 5 +} +let markov = new Markov(markovDB, markovOpts); + +function regenMarkov() { + console.log("Regenerating Markov corpus...") + try { + fileObj = JSON.parse(fs.readFileSync('markovDB.json', 'utf8')) + } + catch (err) { console.log(err) } + // console.log("MessageCache", messageCache) + markovDB = fileObj.messages + if (markovDB.length == 0) + markovDB.push("hello") + markovDB = markovDB.concat(messageCache) + markov = new Markov(markovDB, markovOpts); + markov.buildCorpusSync() + fileObj.messages = markovDB + fileObj.lastSeenMessageID = lastSeenMessageID + // console.log("WRITING THE FOLLOWING DATA:") + // console.log(fileObj) + fs.writeFileSync('markovDB.json', JSON.stringify(fileObj), 'utf-8') + fileObj = null; + markovDB = [] + messageCache = [] + console.log("Done regenerating Markov corpus.") +} + +function loadConfig() { + let cfgfile = 'config.json' + if (fs.existsSync(cfgfile)) { + let cfg = JSON.parse(fs.readFileSync(cfgfile, 'utf8')) + PREFIX = cfg.prefix + GAME = cfg.game + BOTDESC = cfg.description + inviteCmd = cfg.invitecmd + client.login(cfg.token) + } + else { + console.log('Oh no!!! ' + cfgfile + ' could not be found!') + } +} + +client.on('ready', () => { + console.log('Markbot by Charlie Laabs') + try { lastSeenMessageID = JSON.parse(fs.readFileSync('markovDB.json', 'utf8')).lastSeenMessageID } + catch (err) { console.log(err) } + regenMarkov() +}) + +client.on('error', (err) => { + let errText = 'ERROR: ' + err.name + ' - ' + err.message + console.log(errText) + errors.push(errText) + fs.writeFile('error.json', JSON.stringify(errors), function (err) { + if (err) + console.log('error writing to error file: ' + err.message) + }) +}) + +client.on('message', message => { + if (message.guild) { + let command = validateMessage(message) + // if (command === 'help') { + // I should probably add a help message sometime + // } + if (command === 'train') { + console.log("Training...") + message.channel.fetchMessages({ after: lastSeenMessageID, limit: 100 }) + .then(messages => { + messages.forEach(value => { + messageCache.push(value.content) + }) + regenMarkov() + }).catch(console.error) + } + if (command === 'respond') { + console.log("Responding...") + markov.generateSentence().then(result => { + console.log(result) + message.channel.send(result.string) + }).catch(err => { + console.log(err) + if (err.message == 'Cannot build sentence with current corpus and options') + // message.reply('Not enough chat data for a response. Run `!mark train` to process past messages.') + console.log('Not enough chat data for a response.') + }) + } + if (command === 'regen') { + console.log("Regenerating...") + regenMarkov() + } + if (command === null) { + console.log("Listening...") + messageCache.push(message.content) + } + if (command === inviteCmd) { + let richem = new Discord.RichEmbed() + .setAuthor('Invite ' + client.user.username, client.user.avatarURL) + .setThumbnail(client.user.avatarURL) + .addField('Invite', "[Invite " + client.user.username + " to your server](https://discordapp.com/oauth2/authorize?client_id=" + client.user.id + "&scope=bot)") + + message.channel.send(richem) + .catch(reason => { + message.author.send(richem) + }) + } + lastSeenMessageID = message.id + } +}) + +function validateMessage(message) { + let messageText = message.content.toLowerCase() + let command = null; + let thisPrefix = messageText.substring(0, PREFIX.length) + if (thisPrefix == PREFIX) { + let split = messageText.split(" ") + if (split[0] == PREFIX && split.length == 1) + command = 'respond' + else if (split[1] == 'train') + command = 'train' + else if (split[1] == 'help') + command = 'help' + else if (split[1] == 'regen') + command = 'regen' + else if (split[1] == 'invite') + command = 'invite' + } + return command +} + +loadConfig() diff --git a/markovDB.json b/markovDB.json new file mode 100644 index 0000000..d785161 --- /dev/null +++ b/markovDB.json @@ -0,0 +1 @@ +{"messages":["hello","!mark train","​Taunt Bot no longer uses ! as a prefix. Please use `tb win` instead.","!win","!mark regen","!mark","<@!82684276755136512>, Not enough chat data for a response. Run `!mark regen` to process past messages.","!mark","!mark regen","!mark train","!mark regen","hello 123 chat test","!mark regen","test 123 chat ello","!mark regen","Poor Mark bot","!mark regen","<@!82684276755136512>, Not enough chat data for a response. Run `!mark regen` to process past messages.","!mark","!mark train","<:tp:360290757451579392>","<@!293819987406094338>, Not enough chat data for a response. Run `!mark regen` to process past messages.","!mark regen","!mark","<@!82684276755136512>, Not enough chat data for a response. Run `!mark regen` to process past messages.","!mark","It's trending lmao","https://clips.twitch.tv/ClearSpotlessCiderDBstyle","It makes me smile everytime :)","https://youtu.be/eesxH2-8Jlo","tb stop","tb mvp","<:puke:284833585285038090>","Eww!","","https://youtu.be/Hv6RbEOlqRo?t=43s","!madden","join the club","<:theEyes:244969051418394624>","LMAO","holy fuck","the stupidity is spreading","","? ? ?","So the plot thickens! My brother and his friend had the tattoo done together","I love it :) m m m","!mark train","https://www.youtube.com/watch?v=YiK7IL0kqd0","woof","woofoofoofoofo","<:tp:360290757451579392>","Weird","Woof woof","My bot that doesn't work","Markbot? What's this?","","<@!82684276755136512> you can update demos manager now","oh yeah probably","that sounds like them","is that bentleys","weird","","MARK!","tb mvp","My dog ran away. I found her in the neighborhood's yard eating poop","<:tp:360290757451579392>","<:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392>","Side view :)","you're getting the terrorist role for this one","","<:tp:360290757451579392>","<:tp:360290757451579392>","<:tp:360290757451579392>","<:tp:360290757451579392>","<:tp:360290757451579392>","Kill me","dap","\"last Christmas you gave me my heart and...oh geez\"","Yup, whenever. We'll figure it out","<:tp:360290757451579392>","Just wait. I have to host it myself because some people here are a pain in my ass.","And yeah! I wanna play too!","Captions?","I don't think the bot uses pictures","i wanna play that again : (","The game from jackbox","I don't even know what you're talking about","Do you have any tee shirt pics we can use as memes?","Lolz dab","No dap","!*","Omg please! No dap?","ill take a shot","","can somebody photoshop guzmer doing a dab?","clompus","clockmpus","Oh :)","time to go","time to go","","It makes me smile everytime :)","I don't even know what you're talking about","Yup, whenever. We'll figure it out","Omg please! No dap?","No dap?","test 123 chat ello","Omg please! No dap?","It makes me smile everytime :)","hello 123 chat test","you're getting the terrorist role for this one","<:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392> <:tp:360290757451579392>","the stupidity is spreading","The game from jackbox","that sounds like them","ill take a shot","​Taunt Bot no longer uses ! as a prefix. Please use `tb win` instead.","LOL","LOL","bobo"],"lastSeenMessageID":"408106207878971395"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..045f931 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,377 @@ +{ + "name": "markbot", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, + "big-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/big-json/-/big-json-2.0.0.tgz", + "integrity": "sha512-FI2XaRxMD5TsoqLwOzzmzob2zKZACgpfP6+lXeQ4BGmNZwmnOqjo9oeAyfbOPlrIMt3jNlhrPIyxw3hrZEk3hg==", + "requires": { + "assert-plus": "1.0.0", + "into-stream": "3.1.0", + "json-stream-stringify": "1.5.1", + "JSONStream": "1.3.2", + "mississippi": "1.3.1", + "once": "1.4.0" + } + }, + "bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "discord.js": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.3.0.tgz", + "integrity": "sha512-xM3ydvb4urHjCP3N+Mgpw53a7ZGtmPwllwVgwPqdF2SHNPvTDr4So/+55VVx76s5eO9IMrOWpczsEuIr0/MAgQ==", + "requires": { + "long": "3.2.0", + "prism-media": "0.0.1", + "snekfetch": "3.6.1", + "tweetnacl": "1.0.0", + "ws": "4.0.0" + }, + "dependencies": { + "ws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-4.0.0.tgz", + "integrity": "sha512-QYslsH44bH8O7/W2815u5DpnCpXWpEK44FmaHffNwgJI4JMaSZONgPBTOfrxJ29mXKbXak+LsJ2uAkDTYq2ptQ==", + "requires": { + "async-limiter": "1.0.0", + "safe-buffer": "5.1.1", + "ultron": "1.1.1" + } + } + } + }, + "duplexify": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz", + "integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==", + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "1.4.0" + } + }, + "erlpack": { + "version": "github:discordapp/erlpack#674ebfd3439ba4b7ce616709821d27630f7cdc61", + "requires": { + "bindings": "1.3.0", + "nan": "2.8.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", + "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "requires": { + "from2": "2.3.0", + "p-is-promise": "1.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "json-stream-stringify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-1.5.1.tgz", + "integrity": "sha1-urkFrqkqLxMKThQreOZsg2ehBk4=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "markov-strings": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/markov-strings/-/markov-strings-1.3.5.tgz", + "integrity": "sha512-cGe7DSh1RrkgCxu33xeI6RAhC0KCExGvS7enHkMyieNs0MrSGm9Gu5AYmVCFcWPM/+0SN34t38OdT+/YKrjxjQ==", + "requires": { + "debug": "3.1.0", + "lodash": "4.17.4" + } + }, + "mississippi": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.1.tgz", + "integrity": "sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg==", + "requires": { + "concat-stream": "1.6.0", + "duplexify": "3.5.3", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.2", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "1.0.3", + "pumpify": "1.4.0", + "stream-each": "1.2.2", + "through2": "2.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "requires": { + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "prism-media": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.1.tgz", + "integrity": "sha1-o0JcnKvVDRxsAuVDlBoRiVZnvRA=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", + "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", + "requires": { + "duplexify": "3.5.3", + "inherits": "2.0.3", + "pump": "2.0.1" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "1.4.1", + "once": "1.4.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "snekfetch": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.1.tgz", + "integrity": "sha512-aLEvf1YR440pINb0LEo/SL2Q2s/A26+YEqPlx09A0XpGH7qWp8iqIFFolVILHn2yudWXJne9QWyQu+lzDp+ksQ==" + }, + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "requires": { + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "tweetnacl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", + "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "zlib-sync": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/zlib-sync/-/zlib-sync-0.1.4.tgz", + "integrity": "sha512-DRy+RONKzy/J6skNmq8ZBXtVAIoB4qbun+FCChlSlEvF7s9LJ0wzUXjVwl4tQ/jYT8V+LPzCg/sTcRj4E0g0fQ==", + "requires": { + "nan": "2.8.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..abd7a3c --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "markbot", + "version": "0.1.0", + "description": "A conversational Markov chain bot for Discord", + "main": "index.js", + "scripts": { + "start": "node index.js" + }, + "repository": "", + "keywords": [ + "discord", + "markov", + "chain", + "bot" + ], + "author": "Charlie Laabs ", + "license": "MIT", + "dependencies": { + "big-json": "^2.0.0", + "discord.js": "^11.3.0", + "erlpack": "github:discordapp/erlpack", + "markov-strings": "^1.3.5", + "zlib-sync": "^0.1.4" + } +}