├── .eslintignore ├── .eslintrc.json ├── .github └── ISSUE_TEMPLATE │ └── crash-error-template.md ├── .gitignore ├── .travis.yml ├── Assets ├── Artwork │ ├── ChatBot1080x1080.png │ └── ChatBotReadme.png └── Giphy │ └── giphyfooter.gif ├── Gruntfile.js ├── LICENSE ├── README.md ├── app.js ├── commands ├── fun │ ├── 8ball.js │ ├── random.js │ └── randomfact.js ├── giphy │ └── gifsearch.js ├── main │ ├── help.js │ ├── ping.js │ ├── setgame.js │ ├── sl.js │ └── time.js ├── moderation │ ├── ban.js │ ├── kick.js │ ├── lockdown.js │ ├── mute.js │ ├── purge.js │ ├── unban.js │ └── warn.js ├── serverConfig │ ├── setconf.js │ └── showconf.js └── utilities │ ├── cc.js │ └── reminder.js ├── config ├── example_config.toml └── facts.txt ├── events ├── dblPosted.js ├── disconnect.js ├── guildBanAdd.js ├── guildBanRemove.js ├── guildCreate.js ├── guildDelete.js ├── guildMemberAdd.js ├── message.js ├── ready.js └── reconnecting.js ├── licenses.csv ├── mainDefs.js ├── package-lock.json ├── package.json ├── start_scripts ├── index.js ├── loginit.js └── web.js ├── test ├── functest.js ├── log.js ├── startup.js ├── testarray.txt └── testconfig.toml ├── tslint.json └── util ├── chatHandler.js └── eventLoader.js /.eslintignore: -------------------------------------------------------------------------------- 1 | *.* 2 | !*.js 3 | *mainDefs.js 4 | node_modules/** 5 | coverage/** -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "sourceType": "module", 9 | "ecmaVersion": 9 10 | }, 11 | "rules": { 12 | "no-console": "off", 13 | "indent": [ 14 | "error", 15 | 4, 16 | { 17 | "SwitchCase": 1 18 | } 19 | ], 20 | "linebreak-style": "off", 21 | "quotes": [ 22 | "warn", 23 | "single" 24 | ], 25 | "semi": [ 26 | "warn", 27 | "always" 28 | ], 29 | "no-unused-vars": "warn", 30 | "prefer-arrow-callback": "warn", 31 | "prefer-const": "warn" 32 | } 33 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/crash-error-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Crash/Error 3 | about: Please fill this out if your bot is crashing or there are errors in the log 4 | 5 | --- 6 | 7 | ## Describe when the error happens 8 | I get the error when I run the command ;updatestats 9 | 10 | ## Steps to reproduce 11 | 1. Set [Stats] -> enable to true 12 | 2. Set [Stats] -> tusersid to "Users in server" 13 | 3. Start the server 14 | 4. Run the command ;updatestats 15 | 5. See error in log 16 | 17 | ## Log 18 | Log File: 19 | ``` 20 | Output of log.txt here 21 | ``` 22 | Console: 23 | ``` 24 | Output of console here (if relevant) 25 | ``` 26 | 27 | ## Host Details 28 | Device (e.g Raspberry Pi): 29 | Operating System (Linux Distro, Windows): 30 | Additional Info: 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.bat 3 | **coverage/ 4 | **temp.* 5 | **data/ 6 | **node_modules/ 7 | **.vscode/ 8 | **test.txt 9 | **config/config.toml 10 | *.ts -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - stable 5 | 6 | install: 7 | - npm install 8 | - npm install -g mocha 9 | - npm install -g istanbul 10 | - npm install -g codecov 11 | - mkdir logs 12 | - touch logs/main.log 13 | - cp test/testconfig.toml config/config.toml 14 | 15 | script: 16 | - npm run coverage 17 | - cat ./coverage/lcov.info | codacy-coverage 18 | - codecov 19 | 20 | notifications: 21 | webhooks: https://chatbot-travis-webhook.herokuapp.com/webhook -------------------------------------------------------------------------------- /Assets/Artwork/ChatBot1080x1080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TolleyLikesRice/ChatBot/3d7ca955fe1d3a3800232f0a0d3eb1cae1dd9ea1/Assets/Artwork/ChatBot1080x1080.png -------------------------------------------------------------------------------- /Assets/Artwork/ChatBotReadme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TolleyLikesRice/ChatBot/3d7ca955fe1d3a3800232f0a0d3eb1cae1dd9ea1/Assets/Artwork/ChatBotReadme.png -------------------------------------------------------------------------------- /Assets/Giphy/giphyfooter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TolleyLikesRice/ChatBot/3d7ca955fe1d3a3800232f0a0d3eb1cae1dd9ea1/Assets/Giphy/giphyfooter.gif -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | grunt.loadNpmTasks('grunt-run'); 4 | 5 | grunt.initConfig({ 6 | run: { 7 | devCover: { 8 | exec: 'istanbul cover ./node_modules/mocha/bin/_mocha --report html -- -R spec' 9 | }, 10 | lint: { 11 | exec: 'eslint .' 12 | }, 13 | lintFix: { 14 | exec: 'eslint . --fix' 15 | }, 16 | tsc: { 17 | exec: 'tsc ./ts/mainDefs --outDir ./' 18 | }, 19 | cover: { 20 | exec: 'istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage' 21 | }, 22 | testWinPrep: { 23 | exec: 'ren config\\config.toml config_.toml && copy test\\testconfig.toml config\\config.toml' 24 | }, 25 | test: { 26 | exec: 'mocha --reporter spec' 27 | }, 28 | testWinCleanup: { 29 | exec: 'del config\\config.toml && ren config\\config_.toml config.toml' 30 | } 31 | } 32 | }); 33 | 34 | grunt.registerTask('default', ['run:tsc', 'run:lintFix']); 35 | grunt.registerTask('devCover', ['run:tsc', 'run:testWinPrep','run:devCover', 'run:testWinCleanup']); 36 | grunt.registerTask('lint', ['run:lint']); 37 | grunt.registerTask('tsc', ['run:tsc']); 38 | grunt.registerTask('lintfix', ['run:lintFix']); 39 | grunt.registerTask('travis', ['run:tsc', 'run:lint', 'run:cover']); 40 | grunt.registerTask('test', ['run:tsc', 'run:testWinPrep', 'run:test','run:testWinCleanup']); 41 | 42 | }; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Tolley B-J 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Since this still seems to get alot of traffic. This is no longer developed, most of it is broken due to discord API changes, and Node, and everything. I was working on a rewrite, although that never really happened. I'll happily merge PRs if anyone manages to fix this spagetti :) 2 | 3 | ![ChatBot](Assets/Artwork/ChatBotReadme.png) 4 | 5 | [![Build Status](https://travis-ci.org/TolleyB-J/ChatBot.svg?branch=master)](https://travis-ci.org/TolleyB-J/ChatBot)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![codecov](https://codecov.io/gh/TolleyB-J/ChatBot/branch/master/graph/badge.svg)](https://codecov.io/gh/TolleyB-J/ChatBot) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/69226337d08d4d43b4684f84d9c80301)](https://www.codacy.com/app/TolleyB-J/ChatBot?utm_source=github.com&utm_medium=referral&utm_content=TolleyB-J/ChatBot&utm_campaign=Badge_Grade) 6 | 7 | [![Discord Bots](https://discordbots.org/api/widget/449600396768313354.svg)](https://discordbots.org/bot/449600396768313354) 8 | 9 | ChatBot is a Work-In-Progress All-In-One bot. I am aiming to add everything from Memes to Admin commands. It is designed to be highly configurable and customizable. It is written in javascript and typescript using the discord.js library. You can self-host if you want that extra level of customization but if you can't be bothered to shell out some money for a server or a raspberry pi then you [invite ChatBot to your server](https://discordapp.com/api/oauth2/authorize?client_id=449600396768313354&permissions=8&scope=bot). There are many features to come. For sneak peeks for whats coming next check out the [ChatBot Trello Board](https://trello.com/b/xvsSdqai/chatbot) to see whats happening. 10 | 11 | ## Ideas 12 | 13 | If you have a suggestion or idea please open an issue with the naming scheme: [Idea] My Awesome Idea. 14 | 15 | ## Can be hosted on 16 | 17 | - Raspberry Pi 2/3/3B+ (Recommended) 18 | - Windows 19 | - Ubuntu 20 | - Debian 21 | 22 | ## Built With 23 | 24 | - Nodejs - Programming Language 25 | - NPM - Dependency Management 26 | - Discord.js - Framework for interacting with the Discord API 27 | 28 | ## Contributors 29 | 30 | - TolleyB-J - Owner, Maintainer, Primary Programmer 31 | - xCustomWorld - Remind Me command 32 | - Arslanshn - Logo 33 | 34 | ## Contributing 35 | 36 | If you would like to help with the development of ChatBot please fork this repository, add some code and then submit a pull request with your code. 37 | 38 | ## License 39 | 40 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 41 | 42 | ## Acknowledgments 43 | 44 | - Thanks to [An Idiots Guide](https://www.youtube.com/channel/UCLun-hgcYUgNvCCj4sIa-jA) for tutorials on discord.js and for this totally awesome [guide](https://anidiots.guide/). 45 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // cSpell:ignore Enmap, main 2 | const Discord = require('discord.js'); 3 | const client = new Discord.Client(); 4 | const fs = require('fs'); 5 | const Enmap = require('enmap'); 6 | const DiscordBotsList = require('dblapi.js'); 7 | const config = require('./mainDefs').config; 8 | client.commands = new Discord.Collection(); 9 | client.aliases = new Discord.Collection(); 10 | let dbl; 11 | if (config.dblEnable === true) { dbl = new DiscordBotsList(config.dblAPI, client); } 12 | 13 | //Set up enmap 14 | client.settings = new Enmap({ 15 | name: 'settings', 16 | fetchAll: false, 17 | autoFetch: true, 18 | cloneLevel: 'deep' 19 | }); 20 | client.defaultSettings = { 21 | prefix: config.Bot.prefix, 22 | modLogChannel: 'mod-log', 23 | modRole: 'Moderator', 24 | adminRole: 'Administrator', 25 | serverOwner: 0, 26 | welcomeChannel: 'general', 27 | welcomeMessage: 'Say hello to {{user}}, everyone! We all need a warm welcome sometimes :D', 28 | msgOffTimerEnable: 'false', 29 | msgOffTimerStart: '00:00', 30 | msgOffTimerEnd: '00:00' 31 | }; 32 | 33 | //Get Logger 34 | require('./start_scripts'); 35 | const winston = require('winston'); 36 | const main = winston.loggers.get('main'); 37 | require('./util/eventLoader')(client, dbl); 38 | 39 | //Print out lettering 40 | main.verbose(' _ _ _ '); 41 | main.verbose(' | | | (_) '); 42 | main.verbose(' | | ___ __ _ __| |_ _ __ __ _ '); 43 | main.verbose(' | | / _ \\ / _` |/ _` | | \'_ \\ / _` |'); 44 | main.verbose(' | |___| (_) | (_| | (_| | | | | | (_| |'); 45 | main.verbose(' |______\\___/ \\__,_|\\__,_|_|_| |_|\\__, |'); 46 | main.verbose(' __/ |'); 47 | main.verbose(' |___/'); 48 | main.verbose('------------------------------------------------'); 49 | 50 | function init() { 51 | main.info('Connecting...'); 52 | } 53 | 54 | function loadModule(ModuleFolder) { 55 | 56 | let files; 57 | try { 58 | files = fs.readdirSync(`./commands/${ModuleFolder}/`); 59 | } catch (error) { 60 | throw new Error('Module Load Error'); 61 | } 62 | main.verbose(`Loading a total of ${files.length} ${ModuleFolder} commands.`); 63 | files.forEach(f => { 64 | const props = require(`./commands/${ModuleFolder}/${f}`); 65 | main.verbose(`Loading ${ModuleFolder} Command: ${props.help.name}. 👌`); 66 | client.commands.set(props.help.name, props); 67 | props.conf.aliases.forEach(alias => { 68 | client.aliases.set(alias, props.help.name); 69 | }); 70 | }); 71 | main.verbose('------------------------------------------------'); 72 | } 73 | 74 | function ele() { 75 | /* istanbul ignore next */ 76 | client.elevation = (message, lvl) => { 77 | try { 78 | const mod = message.guild.roles.find(role => role.name === client.settings.get(message.member.guild.id, 'modRole')); 79 | const admin = message.guild.roles.find(role => role.name === client.settings.get(message.member.guild.id, 'adminRole')); 80 | let permlvl = 0; 81 | if (message.author.id === config.Bot.ownerid) return 4; 82 | if (message.member.id == client.settings.get(message.member.guild.id, 'serverOwner')) return 3; 83 | if (lvl > 1 && permlvl === 1) { 84 | if (mod == undefined) { 85 | message.reply(`Sorry! We could not find the moderator role on your server, please ask one of your server admins to fix this by creating a role called ${client.settings.get(message.member.guild.id, 'modRole')} and then set the name of the Admin role you normally use with the setconf command`); 86 | return 'fail'; 87 | } 88 | if (admin == undefined) { 89 | message.reply(`Sorry! We could not find the administrator role on your server, please ask one of your server admins to fix this by creating a role called ${client.settings.get(message.member.guild.id, 'adminRole')} and then set the name of the Admin role you normally use with the setconf command`); 90 | return 'fail'; 91 | } 92 | if (message.member.roles.has(mod.id)) permlvl = 1; 93 | if (message.member.roles.has(admin.id)) permlvl = 2; 94 | } 95 | return permlvl; 96 | } catch (err) { 97 | message.reply('Sorry an error has occurred please DM <@251055152667164676> with the error message below\n```Elevation System: ' + err + '```'); 98 | return 'fail'; 99 | } 100 | }; 101 | } 102 | 103 | module.exports = { 104 | inittest: init, 105 | loadModule: loadModule, 106 | eletest: ele, 107 | }; 108 | 109 | 110 | main.debug('No test, starting ChatBot'); 111 | init(); 112 | main.verbose('------------------------------------------------'); 113 | //Load in alphabetical order (cause OCD and neatness) 114 | /* istanbul ignore next */ 115 | if (config.Fun.enable) loadModule('fun'); 116 | /* istanbul ignore next */ 117 | if (config.Giphy.enable) loadModule('giphy'); 118 | loadModule('main'); 119 | /* istanbul ignore next */ 120 | if (config.Moderation.enable) loadModule('moderation'); 121 | loadModule('serverConfig'); 122 | /* istanbul ignore next */ 123 | if (config.Utilities.enable) loadModule('utilities'); 124 | ele(); 125 | 126 | /* istanbul ignore next */ 127 | if (!fs.existsSync('./test.txt')) { 128 | if (config.Bot.token != 'YOUR-BOT-TOKEN-HERE') { 129 | client.login(config.Bot.token).catch(error => { main.error(`Error During Login. ${error}`); process.exit(1); }); 130 | } else { 131 | main.error('No token in config.toml. Aborting...'); 132 | } 133 | } -------------------------------------------------------------------------------- /commands/fun/8ball.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message) => { 2 | var responces = ['It is certain', 'Its is decidedly so', 'Without a doubt', 'Yes definatly', 'You may rely on it', 'You can count on it', 'As I see it, yes', 'Most likely', 'Outlook good', 'Yes', 'Signs point to yes', 'Absolutley', 'Reply hazy try again', 'Ask again later', 'Better not tell you now', 'Cannot predict now', 'Concentrate and ask again', 'Don\'t count on it', 'My reply is no', 'My sources say no', 'Outlook not so good', 'Very doubtful', 'Chances aren\'t good']; 3 | var show = responces[Math.floor(Math.random() * responces.length)]; 4 | message.reply(show); 5 | }; 6 | 7 | exports.conf = { 8 | enabled: true, 9 | guildOnly: false, 10 | aliases: [], 11 | permLevel: 1 12 | }; 13 | 14 | exports.help = { 15 | name: '8ball', 16 | description: 'Ask the magic 8 ball', 17 | usage: '8ball ' 18 | }; -------------------------------------------------------------------------------- /commands/fun/random.js: -------------------------------------------------------------------------------- 1 | const rn = require('random-number'); 2 | exports.run = (client, message, args) => { 3 | const num1 = args.slice(0).join(' '); 4 | const num2 = args.slice(1).join(' '); 5 | if (num1.length < 1 || num2.length < 1) return message.reply('You must supply two numbers!'); 6 | const num12 = parseInt(num1); 7 | const num22 = parseInt(num2); 8 | var options = { 9 | min: num12 10 | , max: num22 11 | , integer: true 12 | }; 13 | var number = rn(options); 14 | message.reply(`Your number between ${num12} and ${num22} is ${number}`); 15 | }; 16 | 17 | exports.conf = { 18 | enabled: true, 19 | guildOnly: false, 20 | aliases: [], 21 | permLevel: 1 22 | }; 23 | 24 | exports.help = { 25 | name: 'random', 26 | description: 'Generates a random number between number1 and number2', 27 | usage: 'random ' 28 | }; 29 | -------------------------------------------------------------------------------- /commands/fun/randomfact.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message) => { 2 | const funcs = require('../../mainDefs'); 3 | var responces = funcs.textToArray('config/facts.txt'); 4 | var show = responces[Math.floor(Math.random() * responces.length)]; 5 | message.reply(`Did you Know? ${show}`); 6 | }; 7 | 8 | exports.conf = { 9 | enabled: true, 10 | guildOnly: false, 11 | aliases: [], 12 | permLevel: 1 13 | }; 14 | 15 | exports.help = { 16 | name: 'randomfact', 17 | description: 'Gives you a random fact', 18 | usage: 'randomfact' 19 | }; -------------------------------------------------------------------------------- /commands/giphy/gifsearch.js: -------------------------------------------------------------------------------- 1 | const giphy = require('../../mainDefs.js').giphy; 2 | const Discord = require('discord.js'); 3 | exports.run = (client, message, args) => { 4 | const st = args.join(' '); 5 | const res = args.slice(1).join(' '); 6 | if (st.length < 1) return message.reply('You must supply a search term'); 7 | if (res.length < 1) { 8 | giphy.search('gifs', { 'q': st, 'limit': 1, 'rating': 'pg' }) 9 | .then((response) => { 10 | response.data.forEach((gifObject) => { 11 | var embed = new Discord.RichEmbed() 12 | .setColor('#0050ff') 13 | .setTitle(`${message.author.username}'s Gif`) 14 | .setImage(gifObject.images.original.gif_url); 15 | message.channel.send({ embed }); 16 | }); 17 | message.channel.send({ 18 | files: [{ 19 | attachment: 'Assets/Giphy/giphyfooter.gif', 20 | name: 'Assets/Giphy/giphyfooter.gif' 21 | }] 22 | }); 23 | }) 24 | .catch((err) => { 25 | message.reply(err); 26 | }); 27 | } else if (parseInt(res) > 25) { 28 | return message.reply('Too many results. MAX: 25'); 29 | } else if (parseInt(res) > 0) { 30 | let num = 0; 31 | giphy.search('gifs', { 'q': st, 'limit': parseInt(res), 'rating': 'pg' }) 32 | .then((response) => { 33 | response.data.forEach((gifObject) => { 34 | num = num + 1; 35 | var embed = new Discord.RichEmbed() 36 | .setColor('#0050ff') 37 | .setTitle(`${message.author.username}'s Gif result ${num}`) 38 | .setImage(gifObject.images.original.gif_url); 39 | message.channel.send({ embed }); 40 | }); 41 | message.channel.send({ 42 | files: [{ 43 | attachment: 'Assets/Giphy/giphyfooter.gif', 44 | name: 'Assets/Giphy/giphyfooter.gif' 45 | }] 46 | }) 47 | .catch(console.error); 48 | }) 49 | .catch((err) => { 50 | message.reply(err); 51 | }); 52 | } 53 | }; 54 | 55 | exports.conf = { 56 | enabled: true, 57 | guildOnly: false, 58 | aliases: [], 59 | permLevel: 1 60 | }; 61 | 62 | exports.help = { 63 | name: 'gifsearch', 64 | description: 'Search for gifs on giphy', 65 | usage: 'gifsearch [Results]' 66 | }; -------------------------------------------------------------------------------- /commands/main/help.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message, params, guildConf) => { 2 | if (!params[0]) { 3 | const commandNames = Array.from(client.commands.keys()); 4 | const longest = commandNames.reduce((long, str) => Math.max(long, str.length), 0); 5 | message.channel.send(`= Command List =\n\n[Use ${guildConf.prefix}help for more details]\n\n${client.commands.map(c => `${guildConf.prefix}${c.help.name}${' '.repeat(longest - c.help.name.length)} :: ${c.help.description}`).join('\n')}`, {code:'asciidoc'}); 6 | } else { 7 | let command = params[0]; 8 | if (client.commands.has(command)) { 9 | command = client.commands.get(command); 10 | message.channel.send(`= ${command.help.name} = \n${command.help.description}\nusage::${command.help.usage}`, {code:'asciidoc'}); 11 | } 12 | } 13 | }; 14 | 15 | exports.conf = { 16 | enabled: true, 17 | guildOnly: false, 18 | aliases: ['h'], 19 | permLevel: 1 20 | }; 21 | 22 | exports.help = { 23 | name: 'help', 24 | description: 'Displays all commands.', 25 | usage: 'help [command]' 26 | }; -------------------------------------------------------------------------------- /commands/main/ping.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message) => { 2 | message.channel.send('Ping?') 3 | .then(msg => { 4 | msg.edit(`Pong! (took: ${msg.createdTimestamp - message.createdTimestamp}ms)`); 5 | }); 6 | }; 7 | 8 | exports.conf = { 9 | enabled: true, 10 | guildOnly: false, 11 | aliases: [], 12 | permLevel: 1 13 | }; 14 | 15 | exports.help = { 16 | name: 'ping', 17 | description: 'Ping/Pong command. I wonder what this does? /sarcasm', 18 | usage: 'ping', 19 | }; -------------------------------------------------------------------------------- /commands/main/setgame.js: -------------------------------------------------------------------------------- 1 | const config = require('../../mainDefs').config; 2 | exports.run = (client, message, args) => { 3 | const game = args.join(' '); 4 | client.user.setActivity(game, { type: 'PLAYING' }); 5 | message.reply(`Set game to: ${game} :yum:`); 6 | }; 7 | 8 | exports.conf = { 9 | enabled: false, 10 | guildOnly: false, 11 | aliases: [], 12 | permLevel: 4 13 | }; 14 | 15 | exports.help = { 16 | name: 'setgame', 17 | description: 'Sets the game that the bot is playing', 18 | usage: 'setgame ' 19 | }; 20 | -------------------------------------------------------------------------------- /commands/main/sl.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const config = require('../../mainDefs').config; 3 | exports.run = (client, message) => { 4 | message.reply(`I am in ${client.guilds.array().length} servers! I'll put a list of them in a text file for you. Wait a sec :)`); 5 | client.guilds.forEach((guild) => { 6 | fs.appendFileSync(`./serverList${message.author.id}.txt`, ` - ${guild.name}\n`); 7 | }); 8 | message.reply('Done! Here it is.', {files: [`serverList${message.author.id}.txt`]}); 9 | setTimeout(() => { 10 | fs.unlinkSync(`./serverList${message.author.id}.txt`); 11 | }, 1000); 12 | }; 13 | 14 | exports.conf = { 15 | enabled: true, 16 | guildOnly: false, 17 | aliases: ['sl'], 18 | permLevel: config.Botcmd.serverlistlevel 19 | }; 20 | 21 | exports.help = { 22 | name: 'serverlist', 23 | description: 'Lists all the servers that the bot is connected to.', 24 | usage: 'serverlist ' 25 | }; 26 | -------------------------------------------------------------------------------- /commands/main/time.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message) => { 2 | const d = new Date(); 3 | message.reply(`The current bot time is ${d}`); 4 | }; 5 | 6 | exports.conf = { 7 | enabled: true, 8 | guildOnly: false, 9 | aliases: ['t'], 10 | permLevel: 1 11 | }; 12 | 13 | exports.help = { 14 | name: 'time', 15 | description: 'Gives the current bot time', 16 | usage: 'time', 17 | }; -------------------------------------------------------------------------------- /commands/moderation/ban.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const config = require('../../mainDefs').config; 3 | const winston = require('winston'); 4 | const main = winston.loggers.get('main'); 5 | 6 | exports.run = (client, message, args) => { 7 | const reason = args[1]; 8 | const user = message.mentions.users.first(); 9 | const modlog = config.Moderation.logid; 10 | if (modlog.length < 1) return message.reply('I cannot find a log channel'); 11 | if (reason.length < 1) return message.reply('You must supply a reason for the ban.'); 12 | if (message.mentions.users.size < 1) return message.reply('You must mention someone to ban them.').catch(main.error); 13 | 14 | if (!message.guild.member(user).bannable) return message.reply('I cannot ban that member'); 15 | message.guild.ban(user, 2); 16 | main.info(`New Ban: Target:${user.tag} Moderator:${message.author.tag} Reason:${reason}`); 17 | const embed = new Discord.RichEmbed() 18 | .setColor('#ff0000') 19 | .setTimestamp() 20 | .addField('Action:', 'Ban') 21 | .addField('User:', `${user.tag} (${user.id})`) 22 | .addField('Moderator:', `${message.author.tag}`) 23 | .addField('Reason', reason); return client.channels.get(modlog).send({ embed }); 24 | }; 25 | 26 | exports.conf = { 27 | enabled: true, 28 | guildOnly: false, 29 | aliases: [], 30 | permLevel: config.Moderation.banlevel 31 | }; 32 | 33 | exports.help = { 34 | name: 'ban', 35 | description: 'Bans the mentioned user.', 36 | usage: 'ban ' 37 | }; 38 | -------------------------------------------------------------------------------- /commands/moderation/kick.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const config = require('../../mainDefs').config; 3 | const winston = require('winston'); 4 | const main = winston.loggers.get('main'); 5 | exports.run = (client, message, args) => { 6 | const reason = args.slice(1).join(' '); 7 | const user = message.mentions.users.first(); 8 | const modlog = config.Moderation.logid; 9 | if (modlog.length < 1) return message.reply('I cannot find a log channel'); 10 | if (reason.length < 1) return message.reply('You must supply a reason for the kick.'); 11 | if (message.mentions.users.size < 1) return message.reply('You must mention someone to kick them.').catch(main.error); 12 | 13 | if (!message.guild.member(user).kickable) return message.reply('I cannot kick that member'); 14 | message.guild.member(user).kick(); 15 | main.info(`New Kick: Target:${user.tag} Moderator:${message.author.tag} Reason:${reason}`); 16 | const embed = new Discord.RichEmbed() 17 | .setColor('#ffff26') 18 | .setTimestamp() 19 | .addField('Action:', 'Kick') 20 | .addField('User:', `${user.tag} (${user.id})`) 21 | .addField('Moderator:', `${message.author.tag}`) 22 | .addField('Reason', reason); 23 | return client.channels.get(modlog).send({ embed }); 24 | }; 25 | 26 | exports.conf = { 27 | enabled: true, 28 | guildOnly: false, 29 | aliases: [], 30 | permLevel: config.Moderation.kicklevel 31 | }; 32 | 33 | exports.help = { 34 | name: 'kick', 35 | description: 'Kicks the mentioned user.', 36 | usage: 'kick ' 37 | }; 38 | -------------------------------------------------------------------------------- /commands/moderation/lockdown.js: -------------------------------------------------------------------------------- 1 | const ms = require('ms'); 2 | const winston = require('winston'); 3 | const main = winston.loggers.get('main'); 4 | const config = require('../../mainDefs').config; 5 | exports.run = (client, message, args) => { 6 | if (!client.lockit) client.lockit = []; 7 | const time = args.join(' '); 8 | const validUnlocks = ['release', 'unlock']; 9 | if (!time) return message.reply('You must set a duration for the lockdown in either hours, minutes or seconds'); 10 | 11 | if (validUnlocks.includes(time)) { 12 | message.channel.overwritePermissions(message.guild.id, { 13 | SEND_MESSAGES: null 14 | }).then(() => { 15 | message.channel.send('Lockdown lifted.'); 16 | clearTimeout(client.lockit[message.channel.id]); 17 | delete client.lockit[message.channel.id]; 18 | }).catch(error => { 19 | main.error(error); 20 | }); 21 | } else { 22 | message.channel.overwritePermissions(message.guild.id, { 23 | SEND_MESSAGES: false 24 | }).then(() => { 25 | message.channel.send(`Channel locked down for ${ms(ms(time), { long:true })}`).then(() => { 26 | 27 | client.lockit[message.channel.id] = setTimeout(() => { 28 | message.channel.overwritePermissions(message.guild.id, { 29 | SEND_MESSAGES: null 30 | }).then(message.channel.send('Lockdown lifted.')).catch(main.error); 31 | delete client.lockit[message.channel.id]; 32 | }, ms(time)); 33 | 34 | }).catch(error => { 35 | main.error(error); 36 | }); 37 | }); 38 | } 39 | }; 40 | exports.conf = { 41 | enabled: true, 42 | guildOnly: false, 43 | aliases: ['ld'], 44 | permLevel: config.Moderation.lockdownlevel 45 | }; 46 | 47 | exports.help = { 48 | name: 'lockdown', 49 | description: 'This will lock a channel down for the set duration, be it in hours, minutes or seconds.', 50 | usage: 'lockdown ' 51 | }; -------------------------------------------------------------------------------- /commands/moderation/mute.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const config = require('../../mainDefs').config; 3 | const winston = require('winston'); 4 | const main = winston.loggers.get('main'); 5 | exports.run = (client, message, args) => { 6 | const reason = args.slice(1).join(' '); 7 | const user = message.mentions.users.first(); 8 | const modlog = config.Moderation.logid; 9 | const muteRole = client.guilds.get(message.guild.id).roles.find(role => role.name == 'muted'); 10 | if (!modlog) return message.reply('I cannot find a log channel').catch(main.error); 11 | if (!muteRole) return message.reply('I cannot find a muted role').catch(main.error); 12 | if (reason.length < 1) return message.reply('You must supply a reason for the mute.').catch(main.error); 13 | if (message.mentions.users.size < 1) return message.reply('You must mention someone to mute them.').catch(main.error); 14 | main.log(`New Unmute/Mute: Target:${user.tag} Moderator:${message.author.tag} Reason:${reason}`); 15 | const embed = new Discord.RichEmbed() 16 | .setColor('#26ff46') 17 | .setTimestamp() 18 | .addField('Action:', 'Mute') 19 | .addField('User:', `${user.tag} (${user.id})`) 20 | .addField('Moderator:', `${message.author.tag}`) 21 | .addField('Reason', reason); 22 | if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES_OR_PERMISSIONS')) return message.reply('I do not have the correct permissions.').catch(main.error); 23 | 24 | if (message.guild.member(user).roles.has(muteRole.id)) { 25 | message.guild.member(user).removeRole(muteRole).then(() => { 26 | client.channels.get(modlog).send({ embed }).catch(main.error); 27 | }); 28 | } else { 29 | message.guild.member(user).addRole(muteRole).then(() => { 30 | client.channels.get(modlog).send({ embed }).catch(main.error); 31 | }); 32 | } 33 | 34 | }; 35 | 36 | exports.conf = { 37 | enabled: true, 38 | guildOnly: false, 39 | aliases: ['unmute'], 40 | permLevel: config.Moderation.mutelevel 41 | }; 42 | 43 | exports.help = { 44 | name: 'mute', 45 | description: 'Mutes or unmutes a mentioned user', 46 | usage: 'un/mute ' 47 | }; 48 | -------------------------------------------------------------------------------- /commands/moderation/purge.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const config = require('../../mainDefs').config; 3 | const winston = require('winston'); 4 | const main = winston.loggers.get('main'); 5 | exports.run = (client, message, args) => { 6 | const modlog = config.Moderation.logid; 7 | if (modlog.length < 1) return message.reply('I cannot find a log channel'); 8 | const messagecount = parseInt(args.join(' ')); 9 | message.channel.fetchMessages({ 10 | limit: messagecount 11 | }).then(messages => message.channel.bulkDelete(messages)); 12 | main.verbose(`New Purge: Moderator: ${message.author.tag} Messages Deleted: ${messagecount}`); 13 | const embed = new Discord.RichEmbed() 14 | .setColor('#26ff46') 15 | .setTimestamp() 16 | .addField('Action:', 'Purge') 17 | .addField('Moderator:', `${message.author.tag}`) 18 | .addField('Messages Deleted', `${messagecount}`); 19 | return client.channels.get(modlog).send({ embed }); 20 | }; 21 | 22 | exports.conf = { 23 | enabled: true, 24 | guildOnly: false, 25 | aliases: [], 26 | permLevel: config.Moderation.purgelevel 27 | }; 28 | 29 | exports.help = { 30 | name: 'purge', 31 | description: 'Deletes X amount of messages from a given channel.', 32 | usage: 'purge ' 33 | }; 34 | -------------------------------------------------------------------------------- /commands/moderation/unban.js: -------------------------------------------------------------------------------- 1 | const config = require('../../mainDefs').config; 2 | const winston = require('winston'); 3 | const main = winston.loggers.get('main'); 4 | exports.run = (client, message, args) => { 5 | const reason = args.slice(1).join(' '); 6 | client.unbanReason = reason; 7 | client.unbanAuth = message.author; 8 | const user = args[0]; 9 | const modlog = config.Moderation.logid; 10 | if (modlog.length < 1) return message.reply('I cannot find a log channel'); 11 | if (reason.length < 1) return message.reply('You must supply a reason for the unban.'); 12 | if (!user) return message.reply('You must supply a User Resolvable, such as a user id.').catch(main.error); 13 | message.guild.unban(user); 14 | }; 15 | 16 | exports.conf = { 17 | enabled: true, 18 | guildOnly: false, 19 | aliases: [], 20 | permLevel: config.Moderation.unbanlevel 21 | }; 22 | 23 | exports.help = { 24 | name: 'unban', 25 | description: 'Unbans the user.', 26 | usage: 'unban ' 27 | }; 28 | -------------------------------------------------------------------------------- /commands/moderation/warn.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const config = require('../../mainDefs').config; 3 | const winston = require('winston'); 4 | const main = winston.loggers.get('main'); 5 | exports.run = (client, message, args) => { 6 | const reason = args.slice(1).join(' '); 7 | const user = message.mentions.users.first(); 8 | const modlog = config.Moderation.logid; 9 | if (modlog.length < 1) return message.reply('I cannot find a log channel'); 10 | if (reason.length < 1) return message.reply('You must supply a reason for the warning.'); 11 | if (message.mentions.users.size < 1) return message.reply('You must mention someone to warn them.').catch(main.error); 12 | main.verbose(`New Warn: Target:${user.tag} Moderator:${message.author.tag} Reason:${reason}`); 13 | const embed = new Discord.RichEmbed() 14 | .setColor('#ffff26') 15 | .setTimestamp() 16 | .addField('Action:', 'Warn') 17 | .addField('User:', `${user.tag} (${user.id})`) 18 | .addField('Moderator:', `${message.author.tag}`) 19 | .addField('Reason', reason); 20 | return client.channels.get(modlog).send({ embed }); 21 | }; 22 | 23 | exports.conf = { 24 | enabled: true, 25 | guildOnly: false, 26 | aliases: [], 27 | permLevel: config.Moderation.warnlevel 28 | }; 29 | 30 | exports.help = { 31 | name: 'warn', 32 | description: 'Issues a warning to the mentioned user.', 33 | usage: 'warn ' 34 | }; 35 | -------------------------------------------------------------------------------- /commands/serverConfig/setconf.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message, args) => { 2 | const value = args; 3 | const prop = value.shift(); 4 | 5 | // We can check that the key exists to avoid having multiple useless, 6 | // unused keys in the config: 7 | if(!client.settings.has(message.guild.id, prop)) { 8 | return message.reply('This key is not in the configuration.'); 9 | } 10 | 11 | // Now we can finally change the value. Here we only have strings for values 12 | // so we won't bother trying to make sure it's the right type and such. 13 | client.settings.set(message.guild.id, value.join(' '), prop); 14 | 15 | // We can confirm everything's done to the client. 16 | message.channel.send(`Guild configuration item \`${prop}\` has been changed to:\n\`${value.join(' ')}\``); 17 | }; 18 | exports.conf = { 19 | enabled: true, 20 | guildOnly: false, 21 | aliases: ['setConf', 'setConfig', 'setconfig'], 22 | permLevel: 3 23 | }; 24 | 25 | exports.help = { 26 | name: 'setconf', 27 | description: 'Sets ', 28 | usage: 'setconf {prop} {value}', 29 | }; 30 | -------------------------------------------------------------------------------- /commands/serverConfig/showconf.js: -------------------------------------------------------------------------------- 1 | exports.run = (client, message, args, guildConf) => { 2 | const configProps = Object.keys(guildConf).map(prop => { 3 | return `${prop} : ${guildConf[prop]}\n`; 4 | }); 5 | message.channel.send(`The following are this server's current configuration: 6 | \`\`\`${configProps}\`\`\``); 7 | 8 | }; 9 | exports.conf = { 10 | enabled: true, 11 | guildOnly: false, 12 | aliases: ['showConf', 'showConfig', 'showconfig'], 13 | permLevel: 3 14 | }; 15 | 16 | exports.help = { 17 | name: 'showconf', 18 | description: 'Sets ', 19 | usage: 'showconf {prop} {value}', 20 | }; 21 | -------------------------------------------------------------------------------- /commands/utilities/cc.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | exports.run = (client, message, args, guildConf) => { 4 | const request = require('request'); 5 | const fx = require('money'); 6 | const amount = parseInt(args[0]); 7 | const fromarg = args[1]; 8 | const toarg = args[2]; 9 | request('https://api.exchangeratesapi.io/latest', { json: true }, (err, res, body) => { 10 | if (err) return main.error(err); 11 | if (!('rates' in body)) { 12 | main.warn(`Currency converter server error, code ${body.status}. ${message.author.id} sent '${message.content}' in Guild ${message.guild.id} (${message.guild.name}) The response body from the API was '${JSON.stringify(body)}'.`); 13 | client.users.get('251055152667164676').send(`Currency converter server error, code ${body.status}. User <@${message.author.id}> sent \`${message.content}\` in Guild ${message.guild.id} (${message.guild.name}) The response body from the API was \`\`\`${JSON.stringify(body)}\`\`\`.`); 14 | return message.reply(`Sorry, the API seems to be down at the moment, try again later. I have notified <@251055152667164676> (The owner of this bot) automatically. If the error is still occurring in 48 hours, email tolleybjcoding@gmail.com with the web error code ${body.status}`); 15 | } 16 | var rates = body.rates; 17 | rates[body.base] = 1; 18 | fx.base = body.base; 19 | fx.rates = rates; 20 | try { 21 | var out = fx(amount).from(fromarg).to(toarg); 22 | message.reply(`${amount} ${fromarg} is ${out} ${toarg}`); 23 | } catch (err) { 24 | main.warn(err); 25 | return message.reply(`One of your arguments is in valid. Please use this format ${guildConf.prefix}cc `); 26 | } 27 | }); 28 | }; 29 | 30 | exports.conf = { 31 | enabled: true, 32 | guildOnly: false, 33 | aliases: ['convert', 'moneyconvert', 'cm'], 34 | permLevel: 1 35 | }; 36 | 37 | exports.help = { 38 | name: 'cc', 39 | description: 'Converts currencies, updated every 2 hours', 40 | usage: 'cc ', 41 | }; -------------------------------------------------------------------------------- /commands/utilities/reminder.js: -------------------------------------------------------------------------------- 1 | // From CustomBot 2 | // Copyright (c) CustomWorld 2019. (Almost) all rights reserved. 3 | 4 | exports.run = (client, message, args) => { 5 | let remind = args.slice(2).join(' '); 6 | if (!remind) remind = 'This is the reminder you asked me to send'; 7 | if (isNaN(args[0]) == 'false') return message.channel.send(`"${args[0]}" is not a number.`); 8 | switch (args[1]) { 9 | case 'seconds': 10 | var msDelay = args[0] * 1000; 11 | message.reply('Your reminder has been set. I will remind you in ' + args[0] + ' second(s).'); 12 | setTimeout(() => { message.author.send('\n**REMINDER:**\n' + remind); }, msDelay); 13 | break; 14 | case 'minutes': 15 | msDelay = args[0] * 60000; 16 | message.reply('Your reminder has been set. I will remind you in ' + args[0] + ' minute(s).'); 17 | setTimeout(() => { message.author.send('\n**REMINDER:**\n' + remind); }, msDelay); setTimeout(() => { message.author.send('\n**REMINDER:**\n' + remind); }, msDelay); 18 | break; 19 | case 'hours': 20 | msDelay = args[0] * 3600000; 21 | message.reply('Your reminder has been set. I will remind you in ' + args[0] + ' hour(s).'); 22 | setTimeout(() => { message.author.send('\n**REMINDER:**\n' + remind); }, msDelay); 23 | break; 24 | case 'days': 25 | msDelay = args[0] * 86400000; 26 | message.reply('Your reminder has been set. I will remind you in ' + args[0] + ' day(s).'); 27 | setTimeout(() => { message.author.send('\n**REMINDER:**\n' + remind); }, msDelay); 28 | break; 29 | default: 30 | message.reply('Invalid arguments. Usage: `remindme [message]`'); 31 | break; 32 | } 33 | }; 34 | 35 | exports.conf = { 36 | enabled: true, 37 | guildOnly: false, 38 | aliases: ['remind', 'reminder', 'setremind', 'setreminder'], 39 | permLevel: 1 40 | }; 41 | 42 | exports.help = { 43 | name: 'remindme', 44 | description: 'DM\'s a reminder to you after a specified time (Made by CustomWorld)', 45 | usage: 'remindme [message]', 46 | }; 47 | -------------------------------------------------------------------------------- /config/example_config.toml: -------------------------------------------------------------------------------- 1 | # ____ _ _____ __ _ 2 | # | _ \ | | / ____| / _(_) 3 | # | |_) | ___ | |_ | | ___ _ __ | |_ _ __ _ 4 | # | _ < / _ \| __| | | / _ \| '_ \| _| |/ _` | 5 | # | |_) | (_) | |_ | |___| (_) | | | | | | | (_| | 6 | # |____/ \___/ \__| \_____\___/|_| |_|_| |_|\__, | 7 | # __/ | 8 | # |___/ 9 | # 10 | # This is your ChatBot config file. Here you can customize you bot. 11 | # For more information on configuring your bot go to https://github.com/TolleyB-J/ChatBot 12 | # Note: The permlevels are: 13 | # 1 = Everyone 14 | # 2 = Moderators 15 | # 3 = Admins 16 | # 4 = Owner/Dev Users 17 | 18 | [Bot] 19 | # These are your primary settings for your bot stuff, prefix will only be used as the default prefix. 20 | 'token' = 'TOKEN-HERE' # The token you get from https://discordapp.com/developers/applications/me 21 | 'prefix' = '+' # The prefix for your bot. e.g If my prefix was '-' I would do -help 22 | 'ownerid' = 'OWNER-ID-HERE' # Your account id here, this will give you full permissions for the bot. 23 | 24 | [Logging] 25 | # There are your settings of logging of console 26 | 'logfile' = 'latest.log' # The name of your log file 27 | 'debug' = false # Whether or not to enable extra logging in console 28 | 29 | # __ __ _ _ _____ __ _ 30 | # | \/ | | | | | / ____| / _(_) 31 | # | \ / | ___ __| |_ _| | ___ | | ___ _ __ | |_ _ __ _ 32 | # | |\/| |/ _ \ / _` | | | | |/ _ \ | | / _ \| '_ \| _| |/ _` | 33 | # | | | | (_) | (_| | |_| | | __/ | |___| (_) | | | | | | | (_| | 34 | # |_| |_|\___/ \__,_|\__,_|_|\___| \_____\___/|_| |_|_| |_|\__, | 35 | # __/ | 36 | # |___/ 37 | 38 | 39 | [Moderation] 40 | # The config for the moderation module 41 | 'enable' = true # Whether or not to enable moderation commands 42 | 'banlevel' = 4 # Permlevel for ban command 43 | 'unbanlevel' = 3 # Permlevel for unban command 44 | 'kicklevel' = 3 # Permlevel for kick command 45 | 'lockdownlevel' = 3 # Permlevel for lockdown command 46 | 'mutelevel' = 2 # Permlevel for mute command 47 | 'warnlevel' = 2 # Permlevel for warn command 48 | 'purgelevel' = 2 # Permlevel for mute command 49 | 50 | [Fun] 51 | # NOTE: You can not change the permlevel of the fun commands you may only enable/disable them. 52 | 'enable' = true # Whether or not to enable fun commands 53 | # Working on adding more options 54 | 55 | [Giphy] 56 | # Enable the giphy module 57 | # NOTE: IF YOU PLAN TO USE THIS BOT ON MORE THAN 2 SERVERS APPLY FOR A PRODUCTION KEY. FOR MORE INFO GO TO https://github.com/TolleyB-J/ChatBot 58 | 'enable' = false # Whether or not to enable the giphy commands 59 | 'apikey' = 'YOUR-API-KEY-HERE' 60 | 61 | [Botcmd] 62 | # The config for the bot commands 63 | # This module must be enabled 64 | 'bootgame' = 'Type ;help in chat!' # The bots default game on boot 65 | 66 | [Utilities] 67 | # The config for the utilities commands 68 | 'enable' = true # Whether or not to enable fun commands 69 | # Working on adding more options 70 | 71 | # ______ _ __ _____ __ _ _ 72 | # | ____| | | / _| / ____| / _(_) | | 73 | # | |__ _ __ __| | ___ | |_ | | ___ _ __ | |_ _ __ _| | 74 | # | __| | '_ \ / _` | / _ \| _| | | / _ \| '_ \| _| |/ _` | | 75 | # | |____| | | | (_| | | (_) | | | |___| (_) | | | | | | | (_| |_| 76 | # |______|_| |_|\__,_| \___/|_| \_____\___/|_| |_|_| |_|\__, (_) 77 | # __/ | 78 | # |___/ 79 | 80 | 81 | 82 | 'test' = false # DO NOT EDIT THIS 83 | 'dblEnable' = false # DO NOT EDIT THIS 84 | 'dblAPI' = '' # DO NOT EDIT THIS -------------------------------------------------------------------------------- /config/facts.txt: -------------------------------------------------------------------------------- 1 | An Egyptian mummy is 0% water 2 | A cream cracker is 5% water 3 | A loaf of bread is 36% water 4 | A human being is 65% water 5 | A potato is 79% water 6 | A snail is 80% water 7 | That grass is 85% water 8 | A jellyfish is 95% water 9 | That a wandering albatross can glide for 6 days 10 | That a wandering albatross has a 3 meter wingspan 11 | That a ruby-throated hummingbird flaps 200 times a second 12 | That a honey bee flaps 230 times a second 13 | That a housefly flaps 120 times a second 14 | That a chickadee flaps 27 times a second 15 | That if the world had 100 people, 2 people would be blond 16 | That if the world had 100 people, 8 people would have blue eyes 17 | That if the world had 100 people, 10 people would be left-handed 18 | That if the world had 100 people, 4 people would have "Outtie" belly buttons 19 | That if the world had 100 people, 3 people would be allergic to bee stings 20 | That if the world had 100 people, 2 people would be over 80 years old 21 | That if the world had 100 people, 6 people would own dogs 22 | That if the world had 100 people, 19 people would be Chinese 23 | That if the world had 100 people, 5 people would have travelled on an aeroplane 24 | That if the world had 100 people, 27 people would be under 15 25 | The IRV 3000 sorting machine can sort 14 letters a second, even is the handwriting is terrible 26 | A rat can fit through a hole the size of a UK 50 pence piece 27 | White rice never goes off 28 | Salt never goes off 29 | Sugar never goes off 30 | Honey never goes off 31 | It is illegal to wear "Noisy footwear" in Capri, Italy 32 | It is an act of treason to place a potage stamp the wrong way up if it has a monarch on in the UK 33 | It is illegal to run out of petrol on the motorway in Germany 34 | It is unlawful for an unmarried woman to parachute on a Sunday in Florida, USA 35 | It is illegal to keep a donkey in a bathtub in Arizona, USA 36 | It is illegal to step on a banknote in Thailand 37 | It is illegal to build a sandcastle in Eraclea, Italy 38 | It is illegal to walk down a street with a violin in a paper bag in Salt Lake City, USA 39 | It is illegal to ride an ugly horse in Wilbur, Washington, USA -------------------------------------------------------------------------------- /events/dblPosted.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | 4 | module.exports = () => { 5 | main.verbose('Posted stats to Discord Bots List'); 6 | }; -------------------------------------------------------------------------------- /events/disconnect.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | console.log('1'); 4 | module.exports = () => { 5 | main.warn('You have been disconnected at ' + new Date()); 6 | console.log('2'); 7 | }; -------------------------------------------------------------------------------- /events/guildBanAdd.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | module.exports = (guild, user) => { 4 | main.verbose(`${user.tag} (${user.id})was just banned!`); 5 | }; -------------------------------------------------------------------------------- /events/guildBanRemove.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | module.exports = (guild, user) => { 4 | 5 | main.verbose(`New Unban: Target:${user.tag} Moderator:${guild.client.unbanAuth.tag} Reason:${guild.client.unbanReason}`); 6 | }; -------------------------------------------------------------------------------- /events/guildCreate.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | module.exports = guild => { 4 | main.info(`I just joined a discord server called: ${guild.name}`); 5 | }; -------------------------------------------------------------------------------- /events/guildDelete.js: -------------------------------------------------------------------------------- 1 | module.exports = guild => { 2 | console.log(`I just left a discord server called: ${guild.name}`); 3 | }; -------------------------------------------------------------------------------- /events/guildMemberAdd.js: -------------------------------------------------------------------------------- 1 | module.exports = member => { 2 | const client = member.client; 3 | 4 | // First, ensure the settings exist 5 | client.settings.ensure(member.guild.id, client.defaultSettings); 6 | 7 | // First, get the welcome message using get: 8 | let welcomeMessage = client.settings.get(member.guild.id, 'welcomeMessage'); 9 | 10 | // Our welcome message has a bit of a placeholder, let's fix that: 11 | welcomeMessage = welcomeMessage.replace('{{user}}', member.user.tag); 12 | 13 | // we'll send to the welcome channel. 14 | member.guild.channels 15 | .find(channel => channel.name == client.settings.get(member.guild.id, 'welcomeChannel')) 16 | .send(welcomeMessage) 17 | .catch(console.error); 18 | }; 19 | -------------------------------------------------------------------------------- /events/message.js: -------------------------------------------------------------------------------- 1 | const config = require('../mainDefs').config; 2 | const checkLink = require('../mainDefs').checkLink; 3 | const getUrls = require('get-urls'); 4 | const chatHandler = require('../util/chatHandler'); 5 | const winston = require('winston'); 6 | const main = winston.loggers.get('main'); 7 | module.exports = message => { 8 | const client = message.client; 9 | if (message.author.bot) return; 10 | if (!message.guild) return message.reply('Sorry ChatBot does not supports commands from DMs at the moment.'); 11 | const guildConf = client.settings.ensure(message.guild.id, client.defaultSettings); 12 | //client.settings.set(message.guild.id, message.guild.ownerID, 'serverOwner'); 13 | function find_diff(arr1, arr2) { 14 | const diff = []; 15 | const joined = arr1.concat(arr2); 16 | let i; 17 | for (i = 0; i <= joined.length; i++) { 18 | const current = joined[i]; 19 | if (joined.indexOf(current) == joined.lastIndexOf(current)) { 20 | diff.push(current); 21 | } 22 | } 23 | diff.splice(diff.length - 1, 1); 24 | return diff; 25 | } 26 | function clean(obj) { 27 | for (var propName in obj) { 28 | if (obj[propName] === null || obj[propName] === undefined) { 29 | delete obj[propName]; 30 | } 31 | } 32 | } 33 | const diff = find_diff(Object.keys(guildConf), Object.keys(client.defaultSettings)); 34 | let i; 35 | for (i = 0; i < diff.length; i++) { 36 | client.settings.set(message.guild.id, client.defaultSettings[diff[i]], diff[i]); 37 | } 38 | clean(guildConf); 39 | var d = new Date(); // current time 40 | var hours = d.getHours(); 41 | var mins = d.getMinutes(); 42 | if (hours.length == 1) { hours = parseInt(`0${hours}`); } 43 | if (mins.length == 1) { hours = parseInt(`0${mins}`); } 44 | var time = `${hours}:${mins}`; 45 | var start = guildConf.msgOffTimerStart; 46 | var end = guildConf.msgOffTimerEnd; 47 | if (guildConf.msgOffTimerEnable == 'true' && Date.parse(`01/01/2011 ${time}`) >= Date.parse(`01/01/2011 ${start}`) && Date.parse(`01/01/2011 ${time}`) < Date.parse(`01/01/2011 ${end}`)) { 48 | return; 49 | } 50 | 51 | if (message.content.startsWith(`<@${client.user.id}>`)) { 52 | chatHandler.run(client, message); 53 | return; 54 | } 55 | const prefix = guildConf.prefix || config.Bot.prefix; 56 | //if (!message.content.startsWith(guildConf.prefix)) return; 57 | if (!message.content.startsWith(prefix)) return; 58 | //let command = message.content.split(' ')[0].slice(guildConf.prefix.length); 59 | //let args = message.content.split(' ').slice(guildConf.prefix.length); 60 | const args = message.content.slice(prefix.length).trim().split(/ +/g); 61 | const command = args.shift().toLowerCase(); 62 | let cmd; 63 | if (client.commands.has(command)) { 64 | cmd = client.commands.get(command); 65 | } else if (client.aliases.has(command)) { 66 | cmd = client.commands.get(client.aliases.get(command)); 67 | } else if (cmd.conf.enabled === false) { 68 | return message.reply(':frowning: Sorry, that command is disabled.'); 69 | } else { 70 | return message.reply(':frowning: I don\'t recognize that command. Do `' + prefix + 'help` to see all of my commands. If you believe this is in error then dm <@251055152667164676>'); 71 | } 72 | const perms = client.elevation(message, cmd.conf.permLevel); 73 | if (perms === 'fail') return; 74 | if (perms < cmd.conf.permLevel) return message.reply(`You do not have permission to do this! You need Permlevel ${cmd.conf.permLevel} but you only have Permlevel ${perms}`); 75 | try { 76 | main.verbose(`User ${message.author.id} (${message.author.username}#${message.author.discriminator}) is running '${message.content}' in Guild ${message.guild.id} (${message.guild.name})`); 77 | cmd.run(client, message, args, guildConf, perms); 78 | } catch (err) { 79 | main.warn(`There was an error while User ${message.author.id} (${message.author.username}#${message.author.discriminator}) was running '${message.content}' in Guild ${message.guild.id} (${message.guild.name}) The content was\n${err}`); 80 | return message.reply('Sorry an error has occurred please DM <@251055152667164676> with the error message below\n```Command Runner: ' + err + '```'); 81 | } 82 | 83 | }; -------------------------------------------------------------------------------- /events/ready.js: -------------------------------------------------------------------------------- 1 | const chalk = require('chalk'); 2 | const winston = require('winston'); 3 | const main = winston.loggers.get('main'); 4 | const config = require('../mainDefs').config; 5 | module.exports = client => { 6 | main.info(chalk.green('Connected!')); 7 | client.user.setActivity(config.Botcmd.bootgame, { type: 'PLAYING' }); 8 | }; 9 | -------------------------------------------------------------------------------- /events/reconnecting.js: -------------------------------------------------------------------------------- 1 | const winston = require('winston'); 2 | const main = winston.loggers.get('main'); 3 | module.exports = () => { 4 | main.warn('Reconnecting at ' + new Date()); 5 | }; -------------------------------------------------------------------------------- /licenses.csv: -------------------------------------------------------------------------------- 1 | "module name","licenses","repository","licenseUrl","parents" 2 | "@types/better-sqlite3@5.2.2","MIT","https://github.com/DefinitelyTyped/DefinitelyTyped","https://github.com/DefinitelyTyped/DefinitelyTyped/raw/master/LICENSE","chatbot" 3 | "@types/integer@1.0.0","MIT","https://github.com/DefinitelyTyped/DefinitelyTyped","https://github.com/DefinitelyTyped/DefinitelyTyped/raw/master/LICENSE","chatbot" 4 | "@types/node@10.5.6","MIT","https://github.com/DefinitelyTyped/DefinitelyTyped","https://github.com/DefinitelyTyped/DefinitelyTyped/raw/master/LICENSE","chatbot" 5 | "abbrev@1.0.9","ISC","https://github.com/isaacs/abbrev-js","https://github.com/isaacs/abbrev-js/raw/master/LICENSE","chatbot" 6 | "accepts@1.3.5","MIT","https://github.com/jshttp/accepts","https://github.com/jshttp/accepts/raw/master/LICENSE","chatbot" 7 | "agent-base@4.2.1","MIT","https://github.com/TooTallNate/node-agent-base","https://github.com/TooTallNate/node-agent-base","chatbot" 8 | "ajv@5.5.2","MIT","https://github.com/epoberezkin/ajv","https://github.com/epoberezkin/ajv/raw/master/LICENSE","chatbot" 9 | "ajv@6.9.1","MIT","https://github.com/epoberezkin/ajv","https://github.com/epoberezkin/ajv/raw/master/LICENSE","codacy-coverage:chatbot" 10 | "amdefine@1.0.1","BSD-3-Clause OR MIT","https://github.com/jrburke/amdefine","https://github.com/jrburke/amdefine/raw/master/LICENSE","chatbot" 11 | "ansi-colors@3.2.3","MIT","https://github.com/doowb/ansi-colors","https://github.com/doowb/ansi-colors/raw/master/LICENSE","chatbot" 12 | "ansi-regex@2.1.1","MIT","https://github.com/chalk/ansi-regex","https://github.com/chalk/ansi-regex/raw/master/license","chatbot" 13 | "ansi-regex@3.0.0","MIT","https://github.com/chalk/ansi-regex","https://github.com/chalk/ansi-regex/raw/master/license","string-width:chatbot" 14 | "ansi-styles@3.2.1","MIT","https://github.com/chalk/ansi-styles","https://github.com/chalk/ansi-styles/raw/master/license","chatbot" 15 | "argle@1.1.1","MIT","https://github.com/zackehh/argle","https://github.com/zackehh/argle/raw/master/LICENSE","chatbot" 16 | "argparse@1.0.10","MIT","https://github.com/nodeca/argparse","https://github.com/nodeca/argparse/raw/master/LICENSE","chatbot" 17 | "argv@0.0.2","MIT*","","","chatbot" 18 | "arr-diff@4.0.0","MIT","https://github.com/jonschlinkert/arr-diff","https://github.com/jonschlinkert/arr-diff/raw/master/LICENSE","chatbot" 19 | "arr-flatten@1.1.0","MIT","https://github.com/jonschlinkert/arr-flatten","https://github.com/jonschlinkert/arr-flatten/raw/master/LICENSE","chatbot" 20 | "arr-union@3.1.0","MIT","https://github.com/jonschlinkert/arr-union","https://github.com/jonschlinkert/arr-union/raw/master/LICENSE","chatbot" 21 | "array-find-index@1.0.2","MIT","https://github.com/sindresorhus/array-find-index","https://github.com/sindresorhus/array-find-index/raw/master/license","chatbot" 22 | "array-flatten@1.1.1","MIT","https://github.com/blakeembrey/array-flatten","https://github.com/blakeembrey/array-flatten/raw/master/LICENSE","chatbot" 23 | "array-uniq@1.0.2","MIT","https://github.com/sindresorhus/array-uniq","https://github.com/sindresorhus/array-uniq","chatbot" 24 | "array-unique@0.3.2","MIT","https://github.com/jonschlinkert/array-unique","https://github.com/jonschlinkert/array-unique/raw/master/LICENSE","chatbot" 25 | "asap@2.0.6","MIT","https://github.com/kriskowal/asap","https://github.com/kriskowal/asap/raw/master/LICENSE.md","chatbot" 26 | "asn1@0.2.3","MIT","https://github.com/mcavage/node-asn1","https://github.com/mcavage/node-asn1/raw/master/LICENSE","chatbot" 27 | "assert-plus@1.0.0","MIT","https://github.com/mcavage/node-assert-plus","https://github.com/mcavage/node-assert-plus","chatbot" 28 | "assertion-error@1.1.0","MIT","https://github.com/chaijs/assertion-error","https://github.com/chaijs/assertion-error","chatbot" 29 | "assign-symbols@1.0.0","MIT","https://github.com/jonschlinkert/assign-symbols","https://github.com/jonschlinkert/assign-symbols/raw/master/LICENSE","chatbot" 30 | "async-limiter@1.0.0","MIT","https://github.com/strml/async-limiter","https://github.com/strml/async-limiter/raw/master/LICENSE","chatbot" 31 | "async@1.0.0","MIT","https://github.com/caolan/async","https://github.com/caolan/async/raw/master/LICENSE","chatbot" 32 | "async@1.5.2","MIT","https://github.com/caolan/async","https://github.com/caolan/async/raw/master/LICENSE","grunt-legacy-util:chatbot" 33 | "async@2.6.2","MIT","https://github.com/caolan/async","https://github.com/caolan/async/raw/master/LICENSE","handlebars:chatbot" 34 | "asynckit@0.4.0","MIT","https://github.com/alexindigo/asynckit","https://github.com/alexindigo/asynckit/raw/master/LICENSE","chatbot" 35 | "atob@2.1.2","(MIT OR Apache-2.0)","git://git.coolaj86.com/coolaj86/atob.js","https://git.coolaj86.com/coolaj86/atob.js","chatbot" 36 | "aws-sign2@0.7.0","Apache-2.0","https://github.com/mikeal/aws-sign","https://github.com/mikeal/aws-sign/raw/master/LICENSE","chatbot" 37 | "aws4@1.7.0","MIT","https://github.com/mhart/aws4","https://github.com/mhart/aws4/raw/master/LICENSE","chatbot" 38 | "aws4@1.8.0","MIT","https://github.com/mhart/aws4","https://github.com/mhart/aws4/raw/master/LICENSE","codacy-coverage:chatbot" 39 | "balanced-match@1.0.0","MIT","https://github.com/juliangruber/balanced-match","https://github.com/juliangruber/balanced-match/raw/master/LICENSE.md","chatbot" 40 | "base@0.11.2","MIT","https://github.com/node-base/base","https://github.com/node-base/base/raw/master/LICENSE","chatbot" 41 | "bcrypt-pbkdf@1.0.2","BSD-3-Clause","https://github.com/joyent/node-bcrypt-pbkdf","https://github.com/joyent/node-bcrypt-pbkdf/raw/master/LICENSE","chatbot" 42 | "better-sqlite-pool@0.2.0","MIT","https://github.com/hyurl/better-sqlite-pool","https://github.com/hyurl/better-sqlite-pool/raw/master/LICENSE","chatbot" 43 | "better-sqlite3@5.4.0","MIT","https://github.com/JoshuaWise/better-sqlite3","https://github.com/JoshuaWise/better-sqlite3/raw/master/LICENSE","chatbot" 44 | "bluebird@3.5.3","MIT","https://github.com/petkaantonov/bluebird","https://github.com/petkaantonov/bluebird/raw/master/LICENSE","chatbot" 45 | "body-parser@1.18.3","MIT","https://github.com/expressjs/body-parser","https://github.com/expressjs/body-parser/raw/master/LICENSE","chatbot" 46 | "brace-expansion@1.1.11","MIT","https://github.com/juliangruber/brace-expansion","https://github.com/juliangruber/brace-expansion/raw/master/LICENSE","chatbot" 47 | "braces@2.3.2","MIT","https://github.com/micromatch/braces","https://github.com/micromatch/braces/raw/master/LICENSE","chatbot" 48 | "browser-stdout@1.3.1","ISC","https://github.com/kumavis/browser-stdout","https://github.com/kumavis/browser-stdout/raw/master/LICENSE","chatbot" 49 | "builtin-modules@1.1.1","MIT","https://github.com/sindresorhus/builtin-modules","https://github.com/sindresorhus/builtin-modules/raw/master/license","chatbot" 50 | "bytes@3.0.0","MIT","https://github.com/visionmedia/bytes.js","https://github.com/visionmedia/bytes.js/raw/master/LICENSE","chatbot" 51 | "cache-base@1.0.1","MIT","https://github.com/jonschlinkert/cache-base","https://github.com/jonschlinkert/cache-base/raw/master/LICENSE","chatbot" 52 | "camelcase-keys@2.1.0","MIT","https://github.com/sindresorhus/camelcase-keys","https://github.com/sindresorhus/camelcase-keys/raw/master/license","chatbot" 53 | "camelcase@2.1.1","MIT","https://github.com/sindresorhus/camelcase","https://github.com/sindresorhus/camelcase/raw/master/license","camelcase-keys:chatbot" 54 | "camelcase@5.0.0","MIT","https://github.com/sindresorhus/camelcase","https://github.com/sindresorhus/camelcase/raw/master/license","chatbot" 55 | "capture-console@1.0.1","MIT","https://github.com/zackehh/capture-console","https://github.com/zackehh/capture-console/raw/master/LICENSE","chatbot" 56 | "caseless@0.12.0","Apache-2.0","https://github.com/mikeal/caseless","https://github.com/mikeal/caseless/raw/master/LICENSE","chatbot" 57 | "chai@4.1.2","MIT","https://github.com/chaijs/chai","https://github.com/chaijs/chai/raw/master/LICENSE","chatbot" 58 | "chalk@2.4.2","MIT","https://github.com/chalk/chalk","https://github.com/chalk/chalk/raw/master/license","chatbot" 59 | "check-error@1.0.2","MIT","https://github.com/chaijs/check-error","https://github.com/chaijs/check-error/raw/master/LICENSE","chatbot" 60 | "chownr@1.1.1","ISC","https://github.com/isaacs/chownr","https://github.com/isaacs/chownr/raw/master/LICENSE","chatbot" 61 | "class-utils@0.3.6","MIT","https://github.com/jonschlinkert/class-utils","https://github.com/jonschlinkert/class-utils/raw/master/LICENSE","chatbot" 62 | "cliui@4.1.0","ISC","https://github.com/yargs/cliui","https://github.com/yargs/cliui/raw/master/LICENSE.txt","chatbot" 63 | "co@4.6.0","MIT","https://github.com/tj/co","https://github.com/tj/co/raw/master/LICENSE","chatbot" 64 | "codacy-coverage@3.4.0","MIT","https://github.com/codacy/node-codacy-coverage","https://github.com/codacy/node-codacy-coverage/raw/master/LICENSE","chatbot" 65 | "code-point-at@1.1.0","MIT","https://github.com/sindresorhus/code-point-at","https://github.com/sindresorhus/code-point-at/raw/master/license","chatbot" 66 | "codecov@3.2.0","MIT","https://github.com/codecov/codecov-node","https://github.com/codecov/codecov-node/raw/master/LICENSE","chatbot" 67 | "coffeescript@1.10.0","MIT","https://github.com/jashkenas/coffeescript","https://github.com/jashkenas/coffeescript/raw/master/LICENSE","chatbot" 68 | "collection-visit@1.0.0","MIT","https://github.com/jonschlinkert/collection-visit","https://github.com/jonschlinkert/collection-visit/raw/master/LICENSE","chatbot" 69 | "color-convert@1.9.3","MIT","https://github.com/Qix-/color-convert","https://github.com/Qix-/color-convert/raw/master/LICENSE","chatbot" 70 | "color-name@1.1.3","MIT","https://github.com/dfcreative/color-name","https://github.com/dfcreative/color-name/raw/master/LICENSE","chatbot" 71 | "colors@1.0.3","MIT","https://github.com/Marak/colors.js","https://github.com/Marak/colors.js/raw/master/MIT-LICENSE.txt","chatbot" 72 | "colors@1.1.2","MIT","https://github.com/Marak/colors.js","https://github.com/Marak/colors.js/raw/master/LICENSE","grunt-legacy-log:chatbot" 73 | "combined-stream@1.0.6","MIT","https://github.com/felixge/node-combined-stream","https://github.com/felixge/node-combined-stream/raw/master/License","chatbot" 74 | "commander@2.15.1","MIT","https://github.com/tj/commander.js","https://github.com/tj/commander.js/raw/master/LICENSE","jacoco-parse:chatbot" 75 | "commander@2.17.1","MIT","https://github.com/tj/commander.js","https://github.com/tj/commander.js/raw/master/LICENSE","handlebars:chatbot" 76 | "commander@2.19.0","MIT","https://github.com/tj/commander.js","https://github.com/tj/commander.js/raw/master/LICENSE","chatbot" 77 | "component-emitter@1.2.1","MIT","https://github.com/component/emitter","https://github.com/component/emitter/raw/master/LICENSE","chatbot" 78 | "concat-map@0.0.1","MIT","https://github.com/substack/node-concat-map","https://github.com/substack/node-concat-map/raw/master/LICENSE","chatbot" 79 | "content-disposition@0.5.2","MIT","https://github.com/jshttp/content-disposition","https://github.com/jshttp/content-disposition/raw/master/LICENSE","chatbot" 80 | "content-type@1.0.4","MIT","https://github.com/jshttp/content-type","https://github.com/jshttp/content-type/raw/master/LICENSE","chatbot" 81 | "cookie-signature@1.0.6","MIT","https://github.com/visionmedia/node-cookie-signature","https://github.com/visionmedia/node-cookie-signature","chatbot" 82 | "cookie@0.3.1","MIT","https://github.com/jshttp/cookie","https://github.com/jshttp/cookie/raw/master/LICENSE","chatbot" 83 | "copy-descriptor@0.1.1","MIT","https://github.com/jonschlinkert/copy-descriptor","https://github.com/jonschlinkert/copy-descriptor/raw/master/LICENSE","chatbot" 84 | "core-util-is@1.0.2","MIT","https://github.com/isaacs/core-util-is","https://github.com/isaacs/core-util-is/raw/master/LICENSE","chatbot" 85 | "cross-spawn@6.0.5","MIT","https://github.com/moxystudio/node-cross-spawn","https://github.com/moxystudio/node-cross-spawn/raw/master/LICENSE","chatbot" 86 | "currently-unhandled@0.4.1","MIT","https://github.com/jamestalmage/currently-unhandled","https://github.com/jamestalmage/currently-unhandled/raw/master/license","chatbot" 87 | "cycle@1.0.3","UNKNOWN","https://github.com/dscape/cycle","https://github.com/dscape/cycle","chatbot" 88 | "dashdash@1.14.1","MIT","https://github.com/trentm/node-dashdash","https://github.com/trentm/node-dashdash/raw/master/LICENSE.txt","chatbot" 89 | "dateformat@1.0.12","MIT","https://github.com/felixge/node-dateformat","https://github.com/felixge/node-dateformat/raw/master/LICENSE","chatbot" 90 | "dblapi.js@2.3.0","Apache-2.0","https://github.com/DiscordBotList/dblapi.js","https://github.com/DiscordBotList/dblapi.js/raw/master/LICENSE","chatbot" 91 | "debug@2.6.9","MIT","https://github.com/visionmedia/debug","https://github.com/visionmedia/debug/raw/master/LICENSE","body-parser:chatbot" 92 | "debug@3.1.0","MIT","https://github.com/visionmedia/debug","https://github.com/visionmedia/debug/raw/master/LICENSE","chatbot" 93 | "debug@3.2.6","MIT","https://github.com/visionmedia/debug","https://github.com/visionmedia/debug/raw/master/LICENSE","mocha:chatbot" 94 | "decamelize@1.2.0","MIT","https://github.com/sindresorhus/decamelize","https://github.com/sindresorhus/decamelize/raw/master/license","chatbot" 95 | "decode-uri-component@0.2.0","MIT","https://github.com/SamVerschueren/decode-uri-component","https://github.com/SamVerschueren/decode-uri-component/raw/master/license","chatbot" 96 | "deep-eql@3.0.1","MIT","https://github.com/chaijs/deep-eql","https://github.com/chaijs/deep-eql/raw/master/LICENSE","chatbot" 97 | "deep-is@0.1.3","MIT","https://github.com/thlorenz/deep-is","https://github.com/thlorenz/deep-is/blob/master/LICENSE","chatbot" 98 | "define-properties@1.1.3","MIT","https://github.com/ljharb/define-properties","https://github.com/ljharb/define-properties/raw/master/LICENSE","chatbot" 99 | "define-property@0.2.5","MIT","https://github.com/jonschlinkert/define-property","https://github.com/jonschlinkert/define-property/raw/master/LICENSE","class-utils:chatbot" 100 | "define-property@1.0.0","MIT","https://github.com/jonschlinkert/define-property","https://github.com/jonschlinkert/define-property/raw/master/LICENSE","base:chatbot" 101 | "define-property@2.0.2","MIT","https://github.com/jonschlinkert/define-property","https://github.com/jonschlinkert/define-property/raw/master/LICENSE","chatbot" 102 | "delayed-stream@1.0.0","MIT","https://github.com/felixge/node-delayed-stream","https://github.com/felixge/node-delayed-stream/raw/master/License","chatbot" 103 | "depd@1.1.2","MIT","https://github.com/dougwilson/nodejs-depd","https://github.com/dougwilson/nodejs-depd/raw/master/LICENSE","chatbot" 104 | "destroy@1.0.4","MIT","https://github.com/stream-utils/destroy","https://github.com/stream-utils/destroy/raw/master/LICENSE","chatbot" 105 | "detect-file@1.0.0","MIT","https://github.com/doowb/detect-file","https://github.com/doowb/detect-file/raw/master/LICENSE","chatbot" 106 | "detect-newline@2.1.0","MIT","https://github.com/sindresorhus/detect-newline","https://github.com/sindresorhus/detect-newline/raw/master/license","chatbot" 107 | "diff@3.5.0","BSD-3-Clause","https://github.com/kpdecker/jsdiff","https://github.com/kpdecker/jsdiff/raw/master/LICENSE","chatbot" 108 | "discord.js@11.4.2","Apache-2.0","https://github.com/discordjs/discord.js","https://github.com/discordjs/discord.js/raw/master/LICENSE","chatbot" 109 | "ecc-jsbn@0.1.1","MIT","https://github.com/quartzjer/ecc-jsbn","https://github.com/quartzjer/ecc-jsbn/raw/master/LICENSE","chatbot" 110 | "ee-first@1.1.1","MIT","https://github.com/jonathanong/ee-first","https://github.com/jonathanong/ee-first/raw/master/LICENSE","chatbot" 111 | "encodeurl@1.0.2","MIT","https://github.com/pillarjs/encodeurl","https://github.com/pillarjs/encodeurl/raw/master/LICENSE","chatbot" 112 | "encoding@0.1.12","MIT","https://github.com/andris9/encoding","https://github.com/andris9/encoding/raw/master/LICENSE","chatbot" 113 | "end-of-stream@1.4.1","MIT","https://github.com/mafintosh/end-of-stream","https://github.com/mafintosh/end-of-stream/raw/master/LICENSE","chatbot" 114 | "enmap@4.8.1","Apache-2.0","https://github.com/eslachance/enmap","https://github.com/eslachance/enmap/raw/master/LICENSE","chatbot" 115 | "error-ex@1.3.2","MIT","https://github.com/qix-/node-error-ex","https://github.com/qix-/node-error-ex/raw/master/LICENSE","chatbot" 116 | "es-abstract@1.13.0","MIT","https://github.com/ljharb/es-abstract","https://github.com/ljharb/es-abstract/raw/master/LICENSE","chatbot" 117 | "es-to-primitive@1.2.0","MIT","https://github.com/ljharb/es-to-primitive","https://github.com/ljharb/es-to-primitive/raw/master/LICENSE","chatbot" 118 | "es6-promise@4.2.6","MIT","https://github.com/stefanpenner/es6-promise","https://github.com/stefanpenner/es6-promise/raw/master/LICENSE","chatbot" 119 | "es6-promisify@5.0.0","MIT","https://github.com/digitaldesignlabs/es6-promisify","https://github.com/digitaldesignlabs/es6-promisify","chatbot" 120 | "escape-goat@1.3.0","MIT","https://github.com/sindresorhus/escape-goat","https://github.com/sindresorhus/escape-goat/raw/master/license","chatbot" 121 | "escape-html@1.0.3","MIT","https://github.com/component/escape-html","https://github.com/component/escape-html/raw/master/LICENSE","chatbot" 122 | "escape-string-regexp@1.0.5","MIT","https://github.com/sindresorhus/escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp/raw/master/license","chatbot" 123 | "escodegen@1.8.1","BSD-2-Clause","https://github.com/estools/escodegen","https://github.com/estools/escodegen/raw/master/LICENSE.BSD","chatbot" 124 | "esprima@2.7.3","BSD-2-Clause","https://github.com/jquery/esprima","https://github.com/jquery/esprima/raw/master/LICENSE.BSD","chatbot" 125 | "esprima@4.0.0","BSD-2-Clause","https://github.com/jquery/esprima","https://github.com/jquery/esprima/raw/master/LICENSE.BSD","js-yaml:chatbot" 126 | "esprima@4.0.1","BSD-2-Clause","https://github.com/jquery/esprima","https://github.com/jquery/esprima/raw/master/LICENSE.BSD","codecov:chatbot" 127 | "estraverse@1.9.3","BSD","https://github.com/estools/estraverse","http://github.com/estools/estraverse/raw/master/LICENSE.BSD","chatbot" 128 | "esutils@2.0.2","BSD","https://github.com/estools/esutils","http://github.com/estools/esutils/raw/master/LICENSE.BSD","chatbot" 129 | "etag@1.8.1","MIT","https://github.com/jshttp/etag","https://github.com/jshttp/etag/raw/master/LICENSE","chatbot" 130 | "eventemitter2@0.4.14","MIT","https://github.com/hij1nx/EventEmitter2","https://github.com/hij1nx/EventEmitter2","chatbot" 131 | "execa@1.0.0","MIT","https://github.com/sindresorhus/execa","https://github.com/sindresorhus/execa/raw/master/license","chatbot" 132 | "exit@0.1.2","MIT","https://github.com/cowboy/node-exit","https://github.com/cowboy/node-exit/blob/master/LICENSE-MIT","chatbot" 133 | "expand-brackets@2.1.4","MIT","https://github.com/jonschlinkert/expand-brackets","https://github.com/jonschlinkert/expand-brackets/raw/master/LICENSE","chatbot" 134 | "expand-tilde@2.0.2","MIT","https://github.com/jonschlinkert/expand-tilde","https://github.com/jonschlinkert/expand-tilde/raw/master/LICENSE","chatbot" 135 | "express@4.16.4","MIT","https://github.com/expressjs/express","https://github.com/expressjs/express/raw/master/LICENSE","chatbot" 136 | "extend-shallow@2.0.1","MIT","https://github.com/jonschlinkert/extend-shallow","https://github.com/jonschlinkert/extend-shallow/raw/master/LICENSE","set-value:chatbot" 137 | "extend-shallow@3.0.2","MIT","https://github.com/jonschlinkert/extend-shallow","https://github.com/jonschlinkert/extend-shallow/raw/master/LICENSE","chatbot" 138 | "extend@3.0.2","MIT","https://github.com/justmoon/node-extend","https://github.com/justmoon/node-extend/raw/master/LICENSE","chatbot" 139 | "extglob@2.0.4","MIT","https://github.com/micromatch/extglob","https://github.com/micromatch/extglob/raw/master/LICENSE","chatbot" 140 | "extsprintf@1.3.0","MIT","https://github.com/davepacheco/node-extsprintf","https://github.com/davepacheco/node-extsprintf/raw/master/LICENSE","chatbot" 141 | "eyes@0.1.8","MIT","","","chatbot" 142 | "fast-deep-equal@1.1.0","MIT","https://github.com/epoberezkin/fast-deep-equal","https://github.com/epoberezkin/fast-deep-equal/raw/master/LICENSE","chatbot" 143 | "fast-deep-equal@2.0.1","MIT","https://github.com/epoberezkin/fast-deep-equal","https://github.com/epoberezkin/fast-deep-equal/raw/master/LICENSE","codacy-coverage:chatbot" 144 | "fast-json-stable-stringify@2.0.0","MIT","https://github.com/epoberezkin/fast-json-stable-stringify","https://github.com/epoberezkin/fast-json-stable-stringify/raw/master/LICENSE","chatbot" 145 | "fast-levenshtein@2.0.6","MIT","https://github.com/hiddentao/fast-levenshtein","https://github.com/hiddentao/fast-levenshtein/raw/master/LICENSE.md","chatbot" 146 | "fill-range@4.0.0","MIT","https://github.com/jonschlinkert/fill-range","https://github.com/jonschlinkert/fill-range/raw/master/LICENSE","chatbot" 147 | "finalhandler@1.1.1","MIT","https://github.com/pillarjs/finalhandler","https://github.com/pillarjs/finalhandler/raw/master/LICENSE","chatbot" 148 | "find-up@1.1.2","MIT","https://github.com/sindresorhus/find-up","https://github.com/sindresorhus/find-up/raw/master/license","chatbot" 149 | "find-up@3.0.0","MIT","https://github.com/sindresorhus/find-up","https://github.com/sindresorhus/find-up/raw/master/license","yargs:chatbot" 150 | "findup-sync@0.3.0","MIT","https://github.com/cowboy/node-findup-sync","https://github.com/cowboy/node-findup-sync/blob/master/LICENSE-MIT","chatbot" 151 | "findup-sync@2.0.0","MIT","https://github.com/js-cli/node-findup-sync","https://github.com/js-cli/node-findup-sync","mocha:chatbot" 152 | "flat@4.1.0","BSD-3-Clause","https://github.com/hughsk/flat","https://github.com/hughsk/flat/raw/master/LICENSE","chatbot" 153 | "for-in@1.0.2","MIT","https://github.com/jonschlinkert/for-in","https://github.com/jonschlinkert/for-in/raw/master/LICENSE","chatbot" 154 | "forever-agent@0.6.1","Apache-2.0","https://github.com/mikeal/forever-agent","https://github.com/mikeal/forever-agent/raw/master/LICENSE","chatbot" 155 | "form-data@2.3.2","MIT","https://github.com/form-data/form-data","https://github.com/form-data/form-data/raw/master/License","chatbot" 156 | "forwarded@0.1.2","MIT","https://github.com/jshttp/forwarded","https://github.com/jshttp/forwarded/raw/master/LICENSE","chatbot" 157 | "fragment-cache@0.2.1","MIT","https://github.com/jonschlinkert/fragment-cache","https://github.com/jonschlinkert/fragment-cache/raw/master/LICENSE","chatbot" 158 | "fresh@0.5.2","MIT","https://github.com/jshttp/fresh","https://github.com/jshttp/fresh/raw/master/LICENSE","chatbot" 159 | "fs-minipass@1.2.5","ISC","https://github.com/npm/fs-minipass","https://github.com/npm/fs-minipass/raw/master/LICENSE","chatbot" 160 | "fs.realpath@1.0.0","ISC","https://github.com/isaacs/fs.realpath","https://github.com/isaacs/fs.realpath/raw/master/LICENSE","chatbot" 161 | "function-bind@1.1.1","MIT","https://github.com/Raynos/function-bind","https://github.com/Raynos/function-bind/raw/master/LICENSE","chatbot" 162 | "get-caller-file@1.0.3","ISC","https://github.com/stefanpenner/get-caller-file","https://github.com/stefanpenner/get-caller-file/raw/master/LICENSE.md","chatbot" 163 | "get-func-name@2.0.0","MIT","https://github.com/chaijs/get-func-name","https://github.com/chaijs/get-func-name/raw/master/LICENSE","chatbot" 164 | "get-stdin@4.0.1","MIT","https://github.com/sindresorhus/get-stdin","https://github.com/sindresorhus/get-stdin","chatbot" 165 | "get-stream@4.1.0","MIT","https://github.com/sindresorhus/get-stream","https://github.com/sindresorhus/get-stream/raw/master/license","chatbot" 166 | "get-urls@7.2.0","MIT","https://github.com/sindresorhus/get-urls","https://github.com/sindresorhus/get-urls/raw/master/license","chatbot" 167 | "get-value@2.0.6","MIT","https://github.com/jonschlinkert/get-value","https://github.com/jonschlinkert/get-value/raw/master/LICENSE","chatbot" 168 | "getobject@0.1.0","MIT","https://github.com/cowboy/node-getobject","https://github.com/cowboy/node-getobject/blob/master/LICENSE-MIT","chatbot" 169 | "getpass@0.1.7","MIT","https://github.com/arekinath/node-getpass","https://github.com/arekinath/node-getpass/raw/master/LICENSE","chatbot" 170 | "giphy-js-sdk-core@1.0.6","ISC","","","chatbot" 171 | "glob@5.0.15","ISC","https://github.com/isaacs/node-glob","https://github.com/isaacs/node-glob/raw/master/LICENSE","findup-sync:chatbot" 172 | "glob@7.0.6","ISC","https://github.com/isaacs/node-glob","https://github.com/isaacs/node-glob/raw/master/LICENSE","grunt:chatbot" 173 | "glob@7.1.2","ISC","https://github.com/isaacs/node-glob","https://github.com/isaacs/node-glob/raw/master/LICENSE","chatbot" 174 | "glob@7.1.3","ISC","https://github.com/isaacs/node-glob","https://github.com/isaacs/node-glob/raw/master/LICENSE","mocha:chatbot" 175 | "global-modules@1.0.0","MIT","https://github.com/jonschlinkert/global-modules","https://github.com/jonschlinkert/global-modules/raw/master/LICENSE","chatbot" 176 | "global-prefix@1.0.2","MIT","https://github.com/jonschlinkert/global-prefix","https://github.com/jonschlinkert/global-prefix/raw/master/LICENSE","chatbot" 177 | "graceful-fs@4.1.11","ISC","https://github.com/isaacs/node-graceful-fs","https://github.com/isaacs/node-graceful-fs/raw/master/LICENSE","chatbot" 178 | "growl@1.10.5","MIT","https://github.com/tj/node-growl","https://github.com/tj/node-growl","chatbot" 179 | "grunt-cli@1.2.0","MIT","https://github.com/gruntjs/grunt-cli","https://github.com/gruntjs/grunt-cli","grunt:chatbot" 180 | "grunt-known-options@1.1.0","MIT","https://github.com/gruntjs/grunt-known-options","https://github.com/gruntjs/grunt-known-options/raw/master/LICENSE","chatbot" 181 | "grunt-legacy-log-utils@2.0.1","MIT","https://github.com/gruntjs/grunt-legacy-log-utils","https://github.com/gruntjs/grunt-legacy-log-utils","chatbot" 182 | "grunt-legacy-log@2.0.0","MIT","https://github.com/gruntjs/grunt-legacy-log","https://github.com/gruntjs/grunt-legacy-log/raw/master/LICENSE-MIT","chatbot" 183 | "grunt-legacy-util@1.1.1","MIT","https://github.com/gruntjs/grunt-legacy-util","https://github.com/gruntjs/grunt-legacy-util/raw/master/LICENSE-MIT","chatbot" 184 | "grunt-run@0.8.1","MIT","https://github.com/spalger/grunt-run","https://github.com/spalger/grunt-run/blob/master/LICENSE-MIT","chatbot" 185 | "grunt@1.0.3","MIT","https://github.com/gruntjs/grunt","https://github.com/gruntjs/grunt/raw/master/LICENSE","chatbot" 186 | "handlebars@4.1.0","MIT","https://github.com/wycats/handlebars.js","https://github.com/wycats/handlebars.js/raw/master/LICENSE","chatbot" 187 | "har-schema@2.0.0","ISC","https://github.com/ahmadnassri/har-schema","https://github.com/ahmadnassri/har-schema/raw/master/LICENSE","chatbot" 188 | "har-validator@5.0.3","ISC","https://github.com/ahmadnassri/har-validator","https://github.com/ahmadnassri/har-validator/raw/master/LICENSE","chatbot" 189 | "har-validator@5.1.3","MIT","https://github.com/ahmadnassri/node-har-validator","https://github.com/ahmadnassri/node-har-validator/raw/master/LICENSE","codacy-coverage:chatbot" 190 | "has-flag@1.0.0","MIT","https://github.com/sindresorhus/has-flag","https://github.com/sindresorhus/has-flag/raw/master/license","istanbul:chatbot" 191 | "has-flag@3.0.0","MIT","https://github.com/sindresorhus/has-flag","https://github.com/sindresorhus/has-flag/raw/master/license","chatbot" 192 | "has-symbols@1.0.0","MIT","https://github.com/ljharb/has-symbols","https://github.com/ljharb/has-symbols/raw/master/LICENSE","chatbot" 193 | "has-value@0.3.1","MIT","https://github.com/jonschlinkert/has-value","https://github.com/jonschlinkert/has-value/raw/master/LICENSE","unset-value:chatbot" 194 | "has-value@1.0.0","MIT","https://github.com/jonschlinkert/has-value","https://github.com/jonschlinkert/has-value/raw/master/LICENSE","chatbot" 195 | "has-values@0.1.4","MIT","https://github.com/jonschlinkert/has-values","https://github.com/jonschlinkert/has-values/raw/master/LICENSE","unset-value:chatbot" 196 | "has-values@1.0.0","MIT","https://github.com/jonschlinkert/has-values","https://github.com/jonschlinkert/has-values/raw/master/LICENSE","chatbot" 197 | "has@1.0.3","MIT","https://github.com/tarruda/has","https://github.com/tarruda/has/raw/master/LICENSE-MIT","chatbot" 198 | "he@1.1.1","MIT","https://github.com/mathiasbynens/he","https://github.com/mathiasbynens/he/raw/master/LICENSE-MIT.txt","jacoco-parse:chatbot" 199 | "he@1.2.0","MIT","https://github.com/mathiasbynens/he","https://github.com/mathiasbynens/he/raw/master/LICENSE-MIT.txt","chatbot" 200 | "hoek@5.0.4","BSD-3-Clause","https://github.com/hapijs/hoek","https://github.com/hapijs/hoek/raw/master/LICENSE","chatbot" 201 | "hoek@6.1.2","BSD-3-Clause","https://github.com/hapijs/hoek","https://github.com/hapijs/hoek/raw/master/LICENSE","topo:chatbot" 202 | "homedir-polyfill@1.0.1","MIT","https://github.com/doowb/homedir-polyfill","https://github.com/doowb/homedir-polyfill/raw/master/LICENSE","chatbot" 203 | "hooker@0.2.3","MIT","https://github.com/cowboy/javascript-hooker","https://github.com/cowboy/javascript-hooker/blob/master/LICENSE-MIT","chatbot" 204 | "hosted-git-info@2.7.1","ISC","https://github.com/npm/hosted-git-info","https://github.com/npm/hosted-git-info/raw/master/LICENSE","chatbot" 205 | "http-errors@1.6.3","MIT","https://github.com/jshttp/http-errors","https://github.com/jshttp/http-errors/raw/master/LICENSE","chatbot" 206 | "http-signature@1.2.0","MIT","https://github.com/joyent/node-http-signature","https://github.com/joyent/node-http-signature/raw/master/LICENSE","chatbot" 207 | "https-proxy-agent@2.2.1","MIT","https://github.com/TooTallNate/node-https-proxy-agent","https://github.com/TooTallNate/node-https-proxy-agent","chatbot" 208 | "iconv-lite@0.4.23","MIT","https://github.com/ashtuchkin/iconv-lite","https://github.com/ashtuchkin/iconv-lite/raw/master/LICENSE","chatbot" 209 | "ignore-walk@3.0.1","ISC","https://github.com/isaacs/ignore-walk","https://github.com/isaacs/ignore-walk/raw/master/LICENSE","chatbot" 210 | "indent-string@2.1.0","MIT","https://github.com/sindresorhus/indent-string","https://github.com/sindresorhus/indent-string/raw/master/license","chatbot" 211 | "inflight@1.0.6","ISC","https://github.com/npm/inflight","https://github.com/npm/inflight/raw/master/LICENSE","chatbot" 212 | "inherits@2.0.3","ISC","https://github.com/isaacs/inherits","https://github.com/isaacs/inherits/raw/master/LICENSE","chatbot" 213 | "ini@1.3.5","ISC","https://github.com/isaacs/ini","https://github.com/isaacs/ini/raw/master/LICENSE","chatbot" 214 | "integer@2.1.0","MIT","https://github.com/JoshuaWise/integer","https://github.com/JoshuaWise/integer/raw/master/LICENSE","chatbot" 215 | "invert-kv@2.0.0","MIT","https://github.com/sindresorhus/invert-kv","https://github.com/sindresorhus/invert-kv/raw/master/license","chatbot" 216 | "ip-regex@1.0.3","MIT","https://github.com/sindresorhus/ip-regex","https://github.com/sindresorhus/ip-regex/raw/master/license","chatbot" 217 | "ipaddr.js@1.8.0","MIT","https://github.com/whitequark/ipaddr.js","https://github.com/whitequark/ipaddr.js","chatbot" 218 | "is-accessor-descriptor@0.1.6","MIT","https://github.com/jonschlinkert/is-accessor-descriptor","https://github.com/jonschlinkert/is-accessor-descriptor/raw/master/LICENSE","chatbot" 219 | "is-accessor-descriptor@1.0.0","MIT","https://github.com/jonschlinkert/is-accessor-descriptor","https://github.com/jonschlinkert/is-accessor-descriptor/raw/master/LICENSE","define-property:chatbot" 220 | "is-arrayish@0.2.1","MIT","https://github.com/qix-/node-is-arrayish","https://github.com/qix-/node-is-arrayish/raw/master/LICENSE","chatbot" 221 | "is-buffer@1.1.6","MIT","https://github.com/feross/is-buffer","https://github.com/feross/is-buffer/raw/master/LICENSE","chatbot" 222 | "is-buffer@2.0.3","MIT","https://github.com/feross/is-buffer","https://github.com/feross/is-buffer/raw/master/LICENSE","flat:chatbot" 223 | "is-builtin-module@1.0.0","MIT","https://github.com/sindresorhus/is-builtin-module","https://github.com/sindresorhus/is-builtin-module/raw/master/license","chatbot" 224 | "is-callable@1.1.4","MIT","https://github.com/ljharb/is-callable","https://github.com/ljharb/is-callable/raw/master/LICENSE","chatbot" 225 | "is-data-descriptor@0.1.4","MIT","https://github.com/jonschlinkert/is-data-descriptor","https://github.com/jonschlinkert/is-data-descriptor/raw/master/LICENSE","chatbot" 226 | "is-data-descriptor@1.0.0","MIT","https://github.com/jonschlinkert/is-data-descriptor","https://github.com/jonschlinkert/is-data-descriptor/raw/master/LICENSE","define-property:chatbot" 227 | "is-date-object@1.0.1","MIT","https://github.com/ljharb/is-date-object","https://github.com/ljharb/is-date-object/raw/master/LICENSE","chatbot" 228 | "is-descriptor@0.1.6","MIT","https://github.com/jonschlinkert/is-descriptor","https://github.com/jonschlinkert/is-descriptor/raw/master/LICENSE","chatbot" 229 | "is-descriptor@1.0.2","MIT","https://github.com/jonschlinkert/is-descriptor","https://github.com/jonschlinkert/is-descriptor/raw/master/LICENSE","define-property:chatbot" 230 | "is-extendable@0.1.1","MIT","https://github.com/jonschlinkert/is-extendable","https://github.com/jonschlinkert/is-extendable/raw/master/LICENSE","chatbot" 231 | "is-extendable@1.0.1","MIT","https://github.com/jonschlinkert/is-extendable","https://github.com/jonschlinkert/is-extendable/raw/master/LICENSE","extend-shallow:chatbot" 232 | "is-extglob@2.1.1","MIT","https://github.com/jonschlinkert/is-extglob","https://github.com/jonschlinkert/is-extglob/raw/master/LICENSE","chatbot" 233 | "is-finite@1.0.2","MIT","https://github.com/sindresorhus/is-finite","https://github.com/sindresorhus/is-finite/raw/master/license","chatbot" 234 | "is-fullwidth-code-point@1.0.0","MIT","https://github.com/sindresorhus/is-fullwidth-code-point","https://github.com/sindresorhus/is-fullwidth-code-point/raw/master/license","wrap-ansi:chatbot" 235 | "is-fullwidth-code-point@2.0.0","MIT","https://github.com/sindresorhus/is-fullwidth-code-point","https://github.com/sindresorhus/is-fullwidth-code-point/raw/master/license","chatbot" 236 | "is-glob@3.1.0","MIT","https://github.com/jonschlinkert/is-glob","https://github.com/jonschlinkert/is-glob/raw/master/LICENSE","chatbot" 237 | "is-number@3.0.0","MIT","https://github.com/jonschlinkert/is-number","https://github.com/jonschlinkert/is-number/raw/master/LICENSE","chatbot" 238 | "is-plain-obj@1.1.0","MIT","https://github.com/sindresorhus/is-plain-obj","https://github.com/sindresorhus/is-plain-obj/raw/master/license","chatbot" 239 | "is-plain-object@2.0.4","MIT","https://github.com/jonschlinkert/is-plain-object","https://github.com/jonschlinkert/is-plain-object/raw/master/LICENSE","chatbot" 240 | "is-regex@1.0.4","MIT","https://github.com/ljharb/is-regex","https://github.com/ljharb/is-regex/raw/master/LICENSE","chatbot" 241 | "is-stream@1.1.0","MIT","https://github.com/sindresorhus/is-stream","https://github.com/sindresorhus/is-stream/raw/master/license","chatbot" 242 | "is-symbol@1.0.2","MIT","https://github.com/ljharb/is-symbol","https://github.com/ljharb/is-symbol/raw/master/LICENSE","chatbot" 243 | "is-typedarray@1.0.0","MIT","https://github.com/hughsk/is-typedarray","https://github.com/hughsk/is-typedarray/raw/master/LICENSE.md","chatbot" 244 | "is-utf8@0.2.1","MIT","https://github.com/wayfind/is-utf8","https://github.com/wayfind/is-utf8/raw/master/LICENSE","chatbot" 245 | "is-windows@1.0.2","MIT","https://github.com/jonschlinkert/is-windows","https://github.com/jonschlinkert/is-windows/raw/master/LICENSE","chatbot" 246 | "isarray@1.0.0","MIT","https://github.com/juliangruber/isarray","https://github.com/juliangruber/isarray","chatbot" 247 | "isemail@3.2.0","BSD-3-Clause","https://github.com/hapijs/isemail","https://github.com/hapijs/isemail/raw/master/LICENSE","chatbot" 248 | "isexe@2.0.0","ISC","https://github.com/isaacs/isexe","https://github.com/isaacs/isexe/raw/master/LICENSE","chatbot" 249 | "isobject@2.1.0","MIT","https://github.com/jonschlinkert/isobject","https://github.com/jonschlinkert/isobject/raw/master/LICENSE","has-value:unset-value:chatbot" 250 | "isobject@3.0.1","MIT","https://github.com/jonschlinkert/isobject","https://github.com/jonschlinkert/isobject/raw/master/LICENSE","chatbot" 251 | "isomorphic-fetch@2.2.1","MIT","https://github.com/matthew-andrews/isomorphic-fetch","https://github.com/matthew-andrews/isomorphic-fetch/raw/master/LICENSE","chatbot" 252 | "isstream@0.1.2","MIT","https://github.com/rvagg/isstream","https://github.com/rvagg/isstream/raw/master/LICENSE.md","chatbot" 253 | "istanbul@0.4.5","BSD-3-Clause","https://github.com/gotwarlost/istanbul","https://github.com/gotwarlost/istanbul/raw/master/LICENSE","chatbot" 254 | "jacoco-parse@2.0.1","MIT","https://github.com/vokal/jacoco-parse","https://github.com/vokal/jacoco-parse/raw/master/LICENSE","chatbot" 255 | "joi@13.7.0","BSD-3-Clause","https://github.com/hapijs/joi","https://github.com/hapijs/joi/raw/master/LICENSE","chatbot" 256 | "js-yaml@3.11.0","MIT","https://github.com/nodeca/js-yaml","https://github.com/nodeca/js-yaml/raw/master/LICENSE","chatbot" 257 | "js-yaml@3.12.0","MIT","https://github.com/nodeca/js-yaml","https://github.com/nodeca/js-yaml/raw/master/LICENSE","mocha:chatbot" 258 | "js-yaml@3.12.1","MIT","https://github.com/nodeca/js-yaml","https://github.com/nodeca/js-yaml/raw/master/LICENSE","codecov:chatbot" 259 | "js-yaml@3.5.5","MIT","https://github.com/nodeca/js-yaml","https://github.com/nodeca/js-yaml/raw/master/LICENSE","grunt:chatbot" 260 | "jsbn@0.1.1","MIT","https://github.com/andyperlitch/jsbn","https://github.com/andyperlitch/jsbn/raw/master/LICENSE","chatbot" 261 | "json-schema-traverse@0.3.1","MIT","https://github.com/epoberezkin/json-schema-traverse","https://github.com/epoberezkin/json-schema-traverse/raw/master/LICENSE","chatbot" 262 | "json-schema-traverse@0.4.1","MIT","https://github.com/epoberezkin/json-schema-traverse","https://github.com/epoberezkin/json-schema-traverse/raw/master/LICENSE","codacy-coverage:chatbot" 263 | "json-schema@0.2.3","AFLv2.1,BSD","https://github.com/kriszyp/json-schema","http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43,http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13","chatbot" 264 | "json-stringify-safe@5.0.1","ISC","https://github.com/isaacs/json-stringify-safe","https://github.com/isaacs/json-stringify-safe/raw/master/LICENSE","chatbot" 265 | "jsprim@1.4.1","MIT","https://github.com/joyent/node-jsprim","https://github.com/joyent/node-jsprim/raw/master/LICENSE","chatbot" 266 | "kind-of@3.2.2","MIT","https://github.com/jonschlinkert/kind-of","https://github.com/jonschlinkert/kind-of/raw/master/LICENSE","is-number:chatbot" 267 | "kind-of@4.0.0","MIT","https://github.com/jonschlinkert/kind-of","https://github.com/jonschlinkert/kind-of/raw/master/LICENSE","has-values:chatbot" 268 | "kind-of@5.1.0","MIT","https://github.com/jonschlinkert/kind-of","https://github.com/jonschlinkert/kind-of/raw/master/LICENSE","is-descriptor:chatbot" 269 | "kind-of@6.0.2","MIT","https://github.com/jonschlinkert/kind-of","https://github.com/jonschlinkert/kind-of/raw/master/LICENSE","chatbot" 270 | "lcid@2.0.0","MIT","https://github.com/sindresorhus/lcid","https://github.com/sindresorhus/lcid/raw/master/license","chatbot" 271 | "lcov-parse@1.0.0","BSD-3-Clause","https://github.com/davglass/lcov-parse","https://github.com/davglass/lcov-parse/raw/master/LICENSE","codacy-coverage:chatbot" 272 | "levn@0.3.0","MIT","https://github.com/gkz/levn","https://github.com/gkz/levn/raw/master/LICENSE","chatbot" 273 | "load-json-file@1.1.0","MIT","https://github.com/sindresorhus/load-json-file","https://github.com/sindresorhus/load-json-file/raw/master/license","chatbot" 274 | "locate-path@3.0.0","MIT","https://github.com/sindresorhus/locate-path","https://github.com/sindresorhus/locate-path/raw/master/license","chatbot" 275 | "lodash.isfunction@3.0.9","MIT","https://github.com/lodash/lodash","https://github.com/lodash/lodash/raw/master/LICENSE","chatbot" 276 | "lodash.isnumber@3.0.3","MIT","https://github.com/lodash/lodash","https://github.com/lodash/lodash/raw/master/LICENSE","chatbot" 277 | "lodash@4.17.11","MIT","https://github.com/lodash/lodash","https://github.com/lodash/lodash/raw/master/LICENSE","chatbot" 278 | "log-driver@1.2.7","ISC","https://github.com/cainus/logdriver","https://github.com/cainus/logdriver/raw/master/LICENSE","chatbot" 279 | "log-symbols@2.2.0","MIT","https://github.com/sindresorhus/log-symbols","https://github.com/sindresorhus/log-symbols/raw/master/license","chatbot" 280 | "long@4.0.0","Apache-2.0","https://github.com/dcodeIO/long.js","https://github.com/dcodeIO/long.js/raw/master/LICENSE","chatbot" 281 | "loud-rejection@1.6.0","MIT","https://github.com/sindresorhus/loud-rejection","https://github.com/sindresorhus/loud-rejection/raw/master/license","chatbot" 282 | "map-age-cleaner@0.1.3","MIT","https://github.com/SamVerschueren/map-age-cleaner","https://github.com/SamVerschueren/map-age-cleaner/raw/master/license","chatbot" 283 | "map-cache@0.2.2","MIT","https://github.com/jonschlinkert/map-cache","https://github.com/jonschlinkert/map-cache/raw/master/LICENSE","chatbot" 284 | "map-obj@1.0.1","MIT","https://github.com/sindresorhus/map-obj","https://github.com/sindresorhus/map-obj/raw/master/license","chatbot" 285 | "map-visit@1.0.0","MIT","https://github.com/jonschlinkert/map-visit","https://github.com/jonschlinkert/map-visit/raw/master/LICENSE","chatbot" 286 | "media-typer@0.3.0","MIT","https://github.com/jshttp/media-typer","https://github.com/jshttp/media-typer/raw/master/LICENSE","chatbot" 287 | "mem@4.1.0","MIT","https://github.com/sindresorhus/mem","https://github.com/sindresorhus/mem/raw/master/license","chatbot" 288 | "meow@3.7.0","MIT","https://github.com/sindresorhus/meow","https://github.com/sindresorhus/meow/raw/master/license","chatbot" 289 | "merge-descriptors@1.0.1","MIT","https://github.com/component/merge-descriptors","https://github.com/component/merge-descriptors/raw/master/LICENSE","chatbot" 290 | "methods@1.1.2","MIT","https://github.com/jshttp/methods","https://github.com/jshttp/methods/raw/master/LICENSE","chatbot" 291 | "micromatch@3.1.10","MIT","https://github.com/micromatch/micromatch","https://github.com/micromatch/micromatch/raw/master/LICENSE","chatbot" 292 | "mime-db@1.33.0","MIT","https://github.com/jshttp/mime-db","https://github.com/jshttp/mime-db/raw/master/LICENSE","chatbot" 293 | "mime-db@1.38.0","MIT","https://github.com/jshttp/mime-db","https://github.com/jshttp/mime-db/raw/master/LICENSE","codacy-coverage:chatbot" 294 | "mime-types@2.1.18","MIT","https://github.com/jshttp/mime-types","https://github.com/jshttp/mime-types/raw/master/LICENSE","chatbot" 295 | "mime-types@2.1.22","MIT","https://github.com/jshttp/mime-types","https://github.com/jshttp/mime-types/raw/master/LICENSE","codacy-coverage:chatbot" 296 | "mime@1.4.1","MIT","https://github.com/broofa/node-mime","https://github.com/broofa/node-mime/raw/master/LICENSE","chatbot" 297 | "mimic-fn@1.2.0","MIT","https://github.com/sindresorhus/mimic-fn","https://github.com/sindresorhus/mimic-fn/raw/master/license","chatbot" 298 | "minimatch@3.0.4","ISC","https://github.com/isaacs/minimatch","https://github.com/isaacs/minimatch/raw/master/LICENSE","chatbot" 299 | "minimist@0.0.8","MIT","https://github.com/substack/minimist","https://github.com/substack/minimist/raw/master/LICENSE","chatbot" 300 | "minimist@1.2.0","MIT","https://github.com/substack/minimist","https://github.com/substack/minimist/raw/master/LICENSE","meow:chatbot" 301 | "minipass@2.3.5","ISC","https://github.com/isaacs/minipass","https://github.com/isaacs/minipass/raw/master/LICENSE","chatbot" 302 | "minizlib@1.2.1","MIT","https://github.com/isaacs/minizlib","https://github.com/isaacs/minizlib/raw/master/LICENSE","chatbot" 303 | "mixin-deep@1.3.1","MIT","https://github.com/jonschlinkert/mixin-deep","https://github.com/jonschlinkert/mixin-deep/raw/master/LICENSE","chatbot" 304 | "mkdirp@0.5.1","MIT","https://github.com/substack/node-mkdirp","https://github.com/substack/node-mkdirp/raw/master/LICENSE","chatbot" 305 | "mocha-lcov-reporter@1.3.0","BSD-2-Clause","https://github.com/StevenLooman/mocha-lcov-reporter","https://github.com/StevenLooman/mocha-lcov-reporter/raw/master/LICENSE","chatbot" 306 | "mocha@5.2.0","MIT","https://github.com/mochajs/mocha","https://github.com/mochajs/mocha/raw/master/LICENSE","jacoco-parse:chatbot" 307 | "mocha@6.0.0","MIT","https://github.com/mochajs/mocha","https://github.com/mochajs/mocha/raw/master/LICENSE","chatbot" 308 | "money@0.2.0","UNKNOWN","https://github.com/openexchangerates/money.js","https://github.com/openexchangerates/money.js/raw/master/license","chatbot" 309 | "ms@2.0.0","MIT","https://github.com/zeit/ms","https://github.com/zeit/ms/raw/master/license.md","body-parser:chatbot" 310 | "ms@2.1.1","MIT","https://github.com/zeit/ms","https://github.com/zeit/ms/raw/master/license.md","chatbot" 311 | "nanomatch@1.2.13","MIT","https://github.com/micromatch/nanomatch","https://github.com/micromatch/nanomatch/raw/master/LICENSE","chatbot" 312 | "negotiator@0.6.1","MIT","https://github.com/jshttp/negotiator","https://github.com/jshttp/negotiator/raw/master/LICENSE","chatbot" 313 | "nice-try@1.0.5","MIT","https://github.com/electerious/nice-try","https://github.com/electerious/nice-try/raw/master/LICENSE","chatbot" 314 | "node-environment-flags@1.0.4","Apache-2.0","https://github.com/boneskull/node-environment-flags","https://github.com/boneskull/node-environment-flags","chatbot" 315 | "node-fetch@1.7.3","MIT","https://github.com/bitinn/node-fetch","https://github.com/bitinn/node-fetch/raw/master/LICENSE.md","chatbot" 316 | "node-fetch@2.3.0","MIT","https://github.com/bitinn/node-fetch","https://github.com/bitinn/node-fetch/raw/master/LICENSE.md","teeny-request:chatbot" 317 | "nopt@3.0.6","ISC","https://github.com/npm/nopt","https://github.com/npm/nopt/raw/master/LICENSE","chatbot" 318 | "normalize-package-data@2.4.0","BSD-2-Clause","https://github.com/npm/normalize-package-data","https://github.com/npm/normalize-package-data/raw/master/LICENSE","chatbot" 319 | "normalize-url@2.0.1","MIT","https://github.com/sindresorhus/normalize-url","https://github.com/sindresorhus/normalize-url/raw/master/license","chatbot" 320 | "npm-run-path@2.0.2","MIT","https://github.com/sindresorhus/npm-run-path","https://github.com/sindresorhus/npm-run-path/raw/master/license","chatbot" 321 | "number-is-nan@1.0.1","MIT","https://github.com/sindresorhus/number-is-nan","https://github.com/sindresorhus/number-is-nan/raw/master/license","chatbot" 322 | "oauth-sign@0.8.2","Apache-2.0","https://github.com/mikeal/oauth-sign","https://github.com/mikeal/oauth-sign/raw/master/LICENSE","chatbot" 323 | "oauth-sign@0.9.0","Apache-2.0","https://github.com/mikeal/oauth-sign","https://github.com/mikeal/oauth-sign/raw/master/LICENSE","codacy-coverage:chatbot" 324 | "object-assign@4.1.1","MIT","https://github.com/sindresorhus/object-assign","https://github.com/sindresorhus/object-assign/raw/master/license","chatbot" 325 | "object-copy@0.1.0","MIT","https://github.com/jonschlinkert/object-copy","https://github.com/jonschlinkert/object-copy/raw/master/LICENSE","chatbot" 326 | "object-keys@1.1.0","MIT","https://github.com/ljharb/object-keys","https://github.com/ljharb/object-keys/raw/master/LICENSE","chatbot" 327 | "object-visit@1.0.1","MIT","https://github.com/jonschlinkert/object-visit","https://github.com/jonschlinkert/object-visit/raw/master/LICENSE","chatbot" 328 | "object.assign@4.1.0","MIT","https://github.com/ljharb/object.assign","https://github.com/ljharb/object.assign/raw/master/LICENSE","chatbot" 329 | "object.getownpropertydescriptors@2.0.3","MIT","https://github.com/ljharb/object.getownpropertydescriptors","https://github.com/ljharb/object.getownpropertydescriptors/raw/master/LICENSE","chatbot" 330 | "object.pick@1.3.0","MIT","https://github.com/jonschlinkert/object.pick","https://github.com/jonschlinkert/object.pick/raw/master/LICENSE","chatbot" 331 | "on-finished@2.3.0","MIT","https://github.com/jshttp/on-finished","https://github.com/jshttp/on-finished/raw/master/LICENSE","chatbot" 332 | "once@1.4.0","ISC","https://github.com/isaacs/once","https://github.com/isaacs/once/raw/master/LICENSE","chatbot" 333 | "optimist@0.6.1","MIT/X11","https://github.com/substack/node-optimist","https://github.com/substack/node-optimist/raw/master/LICENSE","chatbot" 334 | "optionator@0.8.2","MIT","https://github.com/gkz/optionator","https://github.com/gkz/optionator/raw/master/LICENSE","chatbot" 335 | "os-locale@3.1.0","MIT","https://github.com/sindresorhus/os-locale","https://github.com/sindresorhus/os-locale/raw/master/license","chatbot" 336 | "p-defer@1.0.0","MIT","https://github.com/sindresorhus/p-defer","https://github.com/sindresorhus/p-defer/raw/master/license","chatbot" 337 | "p-finally@1.0.0","MIT","https://github.com/sindresorhus/p-finally","https://github.com/sindresorhus/p-finally/raw/master/license","chatbot" 338 | "p-is-promise@2.0.0","MIT","https://github.com/sindresorhus/p-is-promise","https://github.com/sindresorhus/p-is-promise/raw/master/license","chatbot" 339 | "p-limit@2.1.0","MIT","https://github.com/sindresorhus/p-limit","https://github.com/sindresorhus/p-limit/raw/master/license","chatbot" 340 | "p-locate@3.0.0","MIT","https://github.com/sindresorhus/p-locate","https://github.com/sindresorhus/p-locate/raw/master/license","chatbot" 341 | "p-try@2.0.0","MIT","https://github.com/sindresorhus/p-try","https://github.com/sindresorhus/p-try/raw/master/license","chatbot" 342 | "parse-json@2.2.0","MIT","https://github.com/sindresorhus/parse-json","https://github.com/sindresorhus/parse-json/raw/master/license","chatbot" 343 | "parse-passwd@1.0.0","MIT","https://github.com/doowb/parse-passwd","https://github.com/doowb/parse-passwd/raw/master/LICENSE","chatbot" 344 | "parseurl@1.3.2","MIT","https://github.com/pillarjs/parseurl","https://github.com/pillarjs/parseurl/raw/master/LICENSE","chatbot" 345 | "pascalcase@0.1.1","MIT","https://github.com/jonschlinkert/pascalcase","https://github.com/jonschlinkert/pascalcase/raw/master/LICENSE","chatbot" 346 | "path-exists@2.1.0","MIT","https://github.com/sindresorhus/path-exists","https://github.com/sindresorhus/path-exists/raw/master/license","chatbot" 347 | "path-exists@3.0.0","MIT","https://github.com/sindresorhus/path-exists","https://github.com/sindresorhus/path-exists/raw/master/license","locate-path:chatbot" 348 | "path-is-absolute@1.0.1","MIT","https://github.com/sindresorhus/path-is-absolute","https://github.com/sindresorhus/path-is-absolute/raw/master/license","chatbot" 349 | "path-key@2.0.1","MIT","https://github.com/sindresorhus/path-key","https://github.com/sindresorhus/path-key/raw/master/license","chatbot" 350 | "path-to-regexp@0.1.7","MIT","https://github.com/component/path-to-regexp","https://github.com/component/path-to-regexp/raw/master/LICENSE","chatbot" 351 | "path-type@1.1.0","MIT","https://github.com/sindresorhus/path-type","https://github.com/sindresorhus/path-type/raw/master/license","chatbot" 352 | "pathval@1.1.0","MIT","https://github.com/chaijs/pathval","https://github.com/chaijs/pathval/raw/master/LICENSE","chatbot" 353 | "performance-now@2.1.0","MIT","https://github.com/braveg1rl/performance-now","https://github.com/braveg1rl/performance-now/raw/master/license.txt","chatbot" 354 | "pify@2.3.0","MIT","https://github.com/sindresorhus/pify","https://github.com/sindresorhus/pify/raw/master/license","chatbot" 355 | "pinkie-promise@2.0.1","MIT","https://github.com/floatdrop/pinkie-promise","https://github.com/floatdrop/pinkie-promise/raw/master/license","chatbot" 356 | "pinkie@2.0.4","MIT","https://github.com/floatdrop/pinkie","https://github.com/floatdrop/pinkie/raw/master/license","chatbot" 357 | "posix-character-classes@0.1.1","MIT","https://github.com/jonschlinkert/posix-character-classes","https://github.com/jonschlinkert/posix-character-classes/raw/master/LICENSE","chatbot" 358 | "prelude-ls@1.1.2","MIT","https://github.com/gkz/prelude-ls","https://raw.github.com/gkz/prelude-ls/master/LICENSE","chatbot" 359 | "prepend-http@2.0.0","MIT","https://github.com/sindresorhus/prepend-http","https://github.com/sindresorhus/prepend-http/raw/master/license","chatbot" 360 | "prism-media@0.0.3","Apache-2.0","https://github.com/hydrabolt/prism-media","https://github.com/hydrabolt/prism-media/raw/master/LICENSE","chatbot" 361 | "promise@7.3.1","MIT","https://github.com/then/promise","https://github.com/then/promise/raw/master/LICENSE","chatbot" 362 | "proxy-addr@2.0.4","MIT","https://github.com/jshttp/proxy-addr","https://github.com/jshttp/proxy-addr/raw/master/LICENSE","chatbot" 363 | "psl@1.1.31","MIT","https://github.com/wrangr/psl","https://github.com/wrangr/psl/raw/master/LICENSE","chatbot" 364 | "pump@3.0.0","MIT","https://github.com/mafintosh/pump","https://github.com/mafintosh/pump/raw/master/LICENSE","chatbot" 365 | "punycode@1.4.1","MIT","https://github.com/bestiejs/punycode.js","https://github.com/bestiejs/punycode.js/raw/master/LICENSE-MIT.txt","chatbot" 366 | "punycode@2.1.1","MIT","https://github.com/bestiejs/punycode.js","https://github.com/bestiejs/punycode.js/raw/master/LICENSE-MIT.txt","isemail:chatbot" 367 | "qs@6.5.2","BSD-3-Clause","https://github.com/ljharb/qs","https://github.com/ljharb/qs/raw/master/LICENSE","chatbot" 368 | "query-string@5.1.1","MIT","https://github.com/sindresorhus/query-string","https://github.com/sindresorhus/query-string/raw/master/license","chatbot" 369 | "random-number@0.0.9","BSD-2-Clause","https://github.com/ashnur/random-number","https://github.com/ashnur/random-number/raw/master/LICENSE.md","chatbot" 370 | "randomstring@1.1.5","MIT","https://github.com/klughammer/node-randomstring","https://github.com/klughammer/node-randomstring/raw/master/LICENSE","chatbot" 371 | "range-parser@1.2.0","MIT","https://github.com/jshttp/range-parser","https://github.com/jshttp/range-parser/raw/master/LICENSE","chatbot" 372 | "raw-body@2.3.3","MIT","https://github.com/stream-utils/raw-body","https://github.com/stream-utils/raw-body/raw/master/LICENSE","chatbot" 373 | "read-pkg-up@1.0.1","MIT","https://github.com/sindresorhus/read-pkg-up","https://github.com/sindresorhus/read-pkg-up/raw/master/license","chatbot" 374 | "read-pkg@1.1.0","MIT","https://github.com/sindresorhus/read-pkg","https://github.com/sindresorhus/read-pkg/raw/master/license","chatbot" 375 | "redent@1.0.0","MIT","https://github.com/sindresorhus/redent","https://github.com/sindresorhus/redent/raw/master/license","chatbot" 376 | "regex-not@1.0.2","MIT","https://github.com/jonschlinkert/regex-not","https://github.com/jonschlinkert/regex-not/raw/master/LICENSE","chatbot" 377 | "repeat-element@1.1.3","MIT","https://github.com/jonschlinkert/repeat-element","https://github.com/jonschlinkert/repeat-element/raw/master/LICENSE","chatbot" 378 | "repeat-string@1.6.1","MIT","https://github.com/jonschlinkert/repeat-string","https://github.com/jonschlinkert/repeat-string/raw/master/LICENSE","chatbot" 379 | "repeating@2.0.1","MIT","https://github.com/sindresorhus/repeating","https://github.com/sindresorhus/repeating/raw/master/license","chatbot" 380 | "request-promise-core@1.1.2","ISC","https://github.com/request/promise-core","https://github.com/request/promise-core/raw/master/LICENSE","chatbot" 381 | "request-promise@4.2.4","ISC","https://github.com/request/request-promise","https://github.com/request/request-promise/raw/master/LICENSE","chatbot" 382 | "request@2.87.0","Apache-2.0","https://github.com/request/request","https://github.com/request/request/raw/master/LICENSE","chatbot" 383 | "request@2.88.0","Apache-2.0","https://github.com/request/request","https://github.com/request/request/raw/master/LICENSE","codacy-coverage:chatbot" 384 | "require-directory@2.1.1","MIT","https://github.com/troygoode/node-require-directory","https://github.com/troygoode/node-require-directory/raw/master/LICENSE","chatbot" 385 | "require-main-filename@1.0.1","ISC","https://github.com/yargs/require-main-filename","https://github.com/yargs/require-main-filename/raw/master/LICENSE.txt","chatbot" 386 | "resolve-dir@1.0.1","MIT","https://github.com/jonschlinkert/resolve-dir","https://github.com/jonschlinkert/resolve-dir/raw/master/LICENSE","chatbot" 387 | "resolve-url@0.2.1","MIT","https://github.com/lydell/resolve-url","https://github.com/lydell/resolve-url/raw/master/LICENSE","chatbot" 388 | "resolve@1.1.7","MIT","https://github.com/substack/node-resolve","https://github.com/substack/node-resolve/raw/master/LICENSE","chatbot" 389 | "ret@0.1.15","MIT","https://github.com/fent/ret.js","https://github.com/fent/ret.js/raw/master/LICENSE","chatbot" 390 | "rimraf@2.6.2","ISC","https://github.com/isaacs/rimraf","https://github.com/isaacs/rimraf/raw/master/LICENSE","chatbot" 391 | "safe-buffer@5.1.2","MIT","https://github.com/feross/safe-buffer","https://github.com/feross/safe-buffer/raw/master/LICENSE","chatbot" 392 | "safe-regex@1.1.0","MIT","https://github.com/substack/safe-regex","https://github.com/substack/safe-regex/raw/master/LICENSE","chatbot" 393 | "safer-buffer@2.1.2","MIT","https://github.com/ChALkeR/safer-buffer","https://github.com/ChALkeR/safer-buffer/raw/master/LICENSE","chatbot" 394 | "sax@1.2.4","ISC","https://github.com/isaacs/sax-js","https://github.com/isaacs/sax-js/raw/master/LICENSE","chatbot" 395 | "semver@5.5.0","ISC","https://github.com/npm/node-semver","https://github.com/npm/node-semver/raw/master/LICENSE","chatbot" 396 | "send@0.16.2","MIT","https://github.com/pillarjs/send","https://github.com/pillarjs/send/raw/master/LICENSE","chatbot" 397 | "serve-static@1.13.2","MIT","https://github.com/expressjs/serve-static","https://github.com/expressjs/serve-static/raw/master/LICENSE","chatbot" 398 | "set-blocking@2.0.0","ISC","https://github.com/yargs/set-blocking","https://github.com/yargs/set-blocking/raw/master/LICENSE.txt","chatbot" 399 | "set-value@0.4.3","MIT","https://github.com/jonschlinkert/set-value","https://github.com/jonschlinkert/set-value/raw/master/LICENSE","union-value:chatbot" 400 | "set-value@2.0.0","MIT","https://github.com/jonschlinkert/set-value","https://github.com/jonschlinkert/set-value/raw/master/LICENSE","chatbot" 401 | "setprototypeof@1.1.0","ISC","https://github.com/wesleytodd/setprototypeof","https://github.com/wesleytodd/setprototypeof/raw/master/LICENSE","chatbot" 402 | "shebang-command@1.2.0","MIT","https://github.com/kevva/shebang-command","https://github.com/kevva/shebang-command/raw/master/license","chatbot" 403 | "shebang-regex@1.0.0","MIT","https://github.com/sindresorhus/shebang-regex","https://github.com/sindresorhus/shebang-regex/raw/master/license","chatbot" 404 | "signal-exit@3.0.2","ISC","https://github.com/tapjs/signal-exit","https://github.com/tapjs/signal-exit/raw/master/LICENSE.txt","chatbot" 405 | "snapdragon-node@2.1.1","MIT","https://github.com/jonschlinkert/snapdragon-node","https://github.com/jonschlinkert/snapdragon-node/raw/master/LICENSE","chatbot" 406 | "snapdragon-util@3.0.1","MIT","https://github.com/jonschlinkert/snapdragon-util","https://github.com/jonschlinkert/snapdragon-util/raw/master/LICENSE","chatbot" 407 | "snapdragon@0.8.2","MIT","https://github.com/jonschlinkert/snapdragon","https://github.com/jonschlinkert/snapdragon/raw/master/LICENSE","chatbot" 408 | "snekfetch@3.6.4","MIT","https://github.com/devsnek/snekfetch","https://github.com/devsnek/snekfetch/raw/master/LICENSE","chatbot" 409 | "sort-keys@2.0.0","MIT","https://github.com/sindresorhus/sort-keys","https://github.com/sindresorhus/sort-keys/raw/master/license","chatbot" 410 | "source-map-resolve@0.5.2","MIT","https://github.com/lydell/source-map-resolve","https://github.com/lydell/source-map-resolve/raw/master/LICENSE","chatbot" 411 | "source-map-url@0.4.0","MIT","https://github.com/lydell/source-map-url","https://github.com/lydell/source-map-url/raw/master/LICENSE","chatbot" 412 | "source-map@0.2.0","BSD","https://github.com/mozilla/source-map","http://opensource.org/licenses/BSD-3-Clause","chatbot" 413 | "source-map@0.5.7","BSD-3-Clause","https://github.com/mozilla/source-map","https://github.com/mozilla/source-map/raw/master/LICENSE","snapdragon:chatbot" 414 | "source-map@0.6.1","BSD-3-Clause","https://github.com/mozilla/source-map","https://github.com/mozilla/source-map/raw/master/LICENSE","handlebars:chatbot" 415 | "spdx-correct@3.0.0","Apache-2.0","https://github.com/jslicense/spdx-correct.js","https://github.com/jslicense/spdx-correct.js/raw/master/LICENSE","chatbot" 416 | "spdx-exceptions@2.1.0","CC-BY-3.0","https://github.com/kemitchell/spdx-exceptions.json","https://github.com/kemitchell/spdx-exceptions.json","chatbot" 417 | "spdx-expression-parse@3.0.0","MIT","https://github.com/jslicense/spdx-expression-parse.js","https://github.com/jslicense/spdx-expression-parse.js/raw/master/LICENSE","chatbot" 418 | "spdx-license-ids@3.0.0","CC0-1.0","https://github.com/shinnn/spdx-license-ids","https://github.com/shinnn/spdx-license-ids","chatbot" 419 | "split-string@3.1.0","MIT","https://github.com/jonschlinkert/split-string","https://github.com/jonschlinkert/split-string/raw/master/LICENSE","chatbot" 420 | "sprintf-js@1.0.3","BSD-3-Clause","https://github.com/alexei/sprintf.js","https://github.com/alexei/sprintf.js/raw/master/LICENSE","chatbot" 421 | "sshpk@1.14.2","MIT","https://github.com/arekinath/node-sshpk","https://github.com/arekinath/node-sshpk/raw/master/LICENSE","chatbot" 422 | "stack-trace@0.0.10","MIT","https://github.com/felixge/node-stack-trace","https://github.com/felixge/node-stack-trace/raw/master/License","chatbot" 423 | "static-extend@0.1.2","MIT","https://github.com/jonschlinkert/static-extend","https://github.com/jonschlinkert/static-extend/raw/master/LICENSE","chatbot" 424 | "statuses@1.4.0","MIT","https://github.com/jshttp/statuses","https://github.com/jshttp/statuses/raw/master/LICENSE","chatbot" 425 | "stealthy-require@1.1.1","ISC","https://github.com/analog-nico/stealthy-require","https://github.com/analog-nico/stealthy-require/raw/master/LICENSE","chatbot" 426 | "strict-uri-encode@1.1.0","MIT","https://github.com/kevva/strict-uri-encode","https://github.com/kevva/strict-uri-encode/raw/master/license","chatbot" 427 | "string-width@1.0.2","MIT","https://github.com/sindresorhus/string-width","https://github.com/sindresorhus/string-width/raw/master/license","wrap-ansi:chatbot" 428 | "string-width@2.1.1","MIT","https://github.com/sindresorhus/string-width","https://github.com/sindresorhus/string-width/raw/master/license","chatbot" 429 | "strip-ansi@3.0.1","MIT","https://github.com/chalk/strip-ansi","https://github.com/chalk/strip-ansi/raw/master/license","chatbot" 430 | "strip-ansi@4.0.0","MIT","https://github.com/chalk/strip-ansi","https://github.com/chalk/strip-ansi/raw/master/license","string-width:chatbot" 431 | "strip-bom@2.0.0","MIT","https://github.com/sindresorhus/strip-bom","https://github.com/sindresorhus/strip-bom/raw/master/license","chatbot" 432 | "strip-eof@1.0.0","MIT","https://github.com/sindresorhus/strip-eof","https://github.com/sindresorhus/strip-eof/raw/master/license","chatbot" 433 | "strip-indent@1.0.1","MIT","https://github.com/sindresorhus/strip-indent","https://github.com/sindresorhus/strip-indent/raw/master/license","chatbot" 434 | "strip-json-comments@2.0.1","MIT","https://github.com/sindresorhus/strip-json-comments","https://github.com/sindresorhus/strip-json-comments/raw/master/license","chatbot" 435 | "supports-color@3.2.3","MIT","https://github.com/chalk/supports-color","https://github.com/chalk/supports-color/raw/master/license","istanbul:chatbot" 436 | "supports-color@5.4.0","MIT","https://github.com/chalk/supports-color","https://github.com/chalk/supports-color/raw/master/license","jacoco-parse:chatbot" 437 | "supports-color@5.5.0","MIT","https://github.com/chalk/supports-color","https://github.com/chalk/supports-color/raw/master/license","chatbot" 438 | "supports-color@6.0.0","MIT","https://github.com/chalk/supports-color","https://github.com/chalk/supports-color/raw/master/license","mocha:chatbot" 439 | "tar@4.4.8","ISC","https://github.com/npm/node-tar","https://github.com/npm/node-tar/raw/master/LICENSE","chatbot" 440 | "teeny-request@3.11.3","Apache-2.0","https://github.com/fhinkel/teeny-request","https://github.com/fhinkel/teeny-request/raw/master/LICENSE","chatbot" 441 | "tlds@1.203.1","MIT","https://github.com/stephenmathieson/node-tlds","https://github.com/stephenmathieson/node-tlds","chatbot" 442 | "to-object-path@0.3.0","MIT","https://github.com/jonschlinkert/to-object-path","https://github.com/jonschlinkert/to-object-path/raw/master/LICENSE","chatbot" 443 | "to-regex-range@2.1.1","MIT","https://github.com/micromatch/to-regex-range","https://github.com/micromatch/to-regex-range/raw/master/LICENSE","chatbot" 444 | "to-regex@3.0.2","MIT","https://github.com/jonschlinkert/to-regex","https://github.com/jonschlinkert/to-regex/raw/master/LICENSE","chatbot" 445 | "toml@3.0.0","MIT","https://github.com/BinaryMuse/toml-node","https://github.com/BinaryMuse/toml-node/raw/master/LICENSE","chatbot" 446 | "topo@3.0.3","BSD-3-Clause","https://github.com/hapijs/topo","https://github.com/hapijs/topo/raw/master/LICENSE","chatbot" 447 | "tough-cookie@2.3.4","BSD-3-Clause","https://github.com/salesforce/tough-cookie","https://github.com/salesforce/tough-cookie/raw/master/LICENSE","chatbot" 448 | "tough-cookie@2.4.3","BSD-3-Clause","https://github.com/salesforce/tough-cookie","https://github.com/salesforce/tough-cookie/raw/master/LICENSE","codacy-coverage:chatbot" 449 | "trim-newlines@1.0.0","MIT","https://github.com/sindresorhus/trim-newlines","https://github.com/sindresorhus/trim-newlines/raw/master/license","chatbot" 450 | "tunnel-agent@0.6.0","Apache-2.0","https://github.com/mikeal/tunnel-agent","https://github.com/mikeal/tunnel-agent/raw/master/LICENSE","chatbot" 451 | "tweetnacl@0.14.5","Unlicense","https://github.com/dchest/tweetnacl-js","https://github.com/dchest/tweetnacl-js/raw/master/LICENSE","sshpk:chatbot" 452 | "tweetnacl@1.0.1","Unlicense","https://github.com/dchest/tweetnacl-js","https://github.com/dchest/tweetnacl-js/raw/master/LICENSE","chatbot" 453 | "type-check@0.3.2","MIT","https://github.com/gkz/type-check","https://github.com/gkz/type-check/raw/master/LICENSE","chatbot" 454 | "type-detect@4.0.8","MIT","https://github.com/chaijs/type-detect","https://github.com/chaijs/type-detect/raw/master/LICENSE","chatbot" 455 | "type-is@1.6.16","MIT","https://github.com/jshttp/type-is","https://github.com/jshttp/type-is/raw/master/LICENSE","chatbot" 456 | "typescript@3.0.1","Apache-2.0","https://github.com/Microsoft/TypeScript","https://github.com/Microsoft/TypeScript/raw/master/LICENSE.txt","chatbot" 457 | "uglify-js@3.4.9","BSD-2-Clause","https://github.com/mishoo/UglifyJS2","https://github.com/mishoo/UglifyJS2/raw/master/LICENSE","handlebars:chatbot" 458 | "underscore.string@3.3.5","MIT","https://github.com/epeli/underscore.string","https://github.com/epeli/underscore.string","chatbot" 459 | "union-value@1.0.0","MIT","https://github.com/jonschlinkert/union-value","https://github.com/jonschlinkert/union-value/raw/master/LICENSE","chatbot" 460 | "unpipe@1.0.0","MIT","https://github.com/stream-utils/unpipe","https://github.com/stream-utils/unpipe/raw/master/LICENSE","chatbot" 461 | "unset-value@1.0.0","MIT","https://github.com/jonschlinkert/unset-value","https://github.com/jonschlinkert/unset-value/raw/master/LICENSE","chatbot" 462 | "uri-js@4.2.2","BSD-2-Clause","https://github.com/garycourt/uri-js","https://github.com/garycourt/uri-js","chatbot" 463 | "urix@0.1.0","MIT","https://github.com/lydell/urix","https://github.com/lydell/urix/raw/master/LICENSE","chatbot" 464 | "url-regex@4.1.1","MIT","https://github.com/kevva/url-regex","https://github.com/kevva/url-regex/raw/master/license","chatbot" 465 | "urlgrey@0.4.4","BSD-2-Clause","https://github.com/cainus/urlgrey","https://github.com/cainus/urlgrey","chatbot" 466 | "use@3.1.1","MIT","https://github.com/jonschlinkert/use","https://github.com/jonschlinkert/use/raw/master/LICENSE","chatbot" 467 | "util-deprecate@1.0.2","MIT","https://github.com/TooTallNate/util-deprecate","https://github.com/TooTallNate/util-deprecate/raw/master/LICENSE","chatbot" 468 | "utils-merge@1.0.1","MIT","https://github.com/jaredhanson/utils-merge","https://github.com/jaredhanson/utils-merge/raw/master/LICENSE","chatbot" 469 | "uuid@3.3.2","MIT","https://github.com/kelektiv/node-uuid","https://github.com/kelektiv/node-uuid/raw/master/LICENSE.md","chatbot" 470 | "uws@100.0.1","UNKNOWN","https://github.com/uNetworking/uWebSockets.js","https://github.com/uNetworking/uWebSockets.js","chatbot" 471 | "validate-npm-package-license@3.0.3","Apache-2.0","https://github.com/kemitchell/validate-npm-package-license.js","https://github.com/kemitchell/validate-npm-package-license.js/raw/master/LICENSE","chatbot" 472 | "vary@1.1.2","MIT","https://github.com/jshttp/vary","https://github.com/jshttp/vary/raw/master/LICENSE","chatbot" 473 | "verror@1.10.0","MIT","https://github.com/davepacheco/node-verror","https://github.com/davepacheco/node-verror/raw/master/LICENSE","chatbot" 474 | "whatwg-fetch@3.0.0","MIT","https://github.com/github/fetch","https://github.com/github/fetch/raw/master/LICENSE","chatbot" 475 | "which-module@2.0.0","ISC","https://github.com/nexdrew/which-module","https://github.com/nexdrew/which-module/raw/master/LICENSE","chatbot" 476 | "which@1.3.1","ISC","https://github.com/isaacs/node-which","https://github.com/isaacs/node-which/raw/master/LICENSE","chatbot" 477 | "wide-align@1.1.3","ISC","https://github.com/iarna/wide-align","https://github.com/iarna/wide-align/raw/master/LICENSE","chatbot" 478 | "winston@2.4.4","MIT","https://github.com/winstonjs/winston","https://github.com/winstonjs/winston/raw/master/LICENSE","chatbot" 479 | "wordwrap@0.0.3","MIT","https://github.com/substack/node-wordwrap","https://github.com/substack/node-wordwrap/raw/master/LICENSE","optimist:chatbot" 480 | "wordwrap@1.0.0","MIT","https://github.com/substack/node-wordwrap","https://github.com/substack/node-wordwrap/raw/master/LICENSE","chatbot" 481 | "wrap-ansi@2.1.0","MIT","https://github.com/chalk/wrap-ansi","https://github.com/chalk/wrap-ansi/raw/master/license","chatbot" 482 | "wrappy@1.0.2","ISC","https://github.com/npm/wrappy","https://github.com/npm/wrappy/raw/master/LICENSE","chatbot" 483 | "ws@4.1.0","MIT","https://github.com/websockets/ws","https://github.com/websockets/ws/raw/master/LICENSE","chatbot" 484 | "wtfnode@0.8.0","ISC","https://github.com/myndzi/wtfnode","https://github.com/myndzi/wtfnode","chatbot" 485 | "xml2js@0.4.19","MIT","https://github.com/Leonidas-from-XIV/node-xml2js","https://github.com/Leonidas-from-XIV/node-xml2js/raw/master/LICENSE","chatbot" 486 | "xmlbuilder@9.0.7","MIT","https://github.com/oozcitak/xmlbuilder-js","https://github.com/oozcitak/xmlbuilder-js/raw/master/LICENSE","chatbot" 487 | "y18n@4.0.0","ISC","https://github.com/yargs/y18n","https://github.com/yargs/y18n/raw/master/LICENSE","chatbot" 488 | "yallist@3.0.3","ISC","https://github.com/isaacs/yallist","https://github.com/isaacs/yallist/raw/master/LICENSE","chatbot" 489 | "yargs-parser@11.1.1","ISC","https://github.com/yargs/yargs-parser","https://github.com/yargs/yargs-parser/raw/master/LICENSE.txt","chatbot" 490 | "yargs-unparser@1.5.0","MIT","https://github.com/yargs/yargs-unparser","https://github.com/yargs/yargs-unparser/raw/master/LICENSE","chatbot" 491 | "yargs@12.0.5","MIT","https://github.com/yargs/yargs","https://github.com/yargs/yargs/raw/master/LICENSE","chatbot" -------------------------------------------------------------------------------- /mainDefs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.__esModule = true; 3 | // Imports 4 | var fs_1 = require("fs"); 5 | var GphApiClient = require("giphy-js-sdk-core"); 6 | var request_1 = require("request"); 7 | var toml_1 = require("toml"); 8 | var detectNewline = require("detect-newline"); 9 | // Define Vars 10 | var config = toml_1.parse(fs_1.readFileSync("./config/config.toml", "utf-8")); 11 | exports.config = config; 12 | var giphy = GphApiClient(config.Giphy.apikey); 13 | exports.giphy = giphy; 14 | function textToArray(path) { 15 | if (typeof path !== "string") { 16 | throw new TypeError("Path supplied is not a string"); 17 | } 18 | var text = fs_1.readFileSync(path, "utf-8"); 19 | var lineEnding = detectNewline(text); 20 | var textByLine = text.split(lineEnding); 21 | return textByLine; 22 | } 23 | exports.textToArray = textToArray; 24 | function checkLink(linktotest, done, service) { 25 | var link = service || "https://safebrowsing.googleapis.com/v4/threatMatches:find?key=AIzaSyAUfpmb1XJc2SSnWZT27Ena_0e4kCv1T4Q"; 26 | request_1.post({ 27 | url: link, 28 | json: { 29 | client: { 30 | clientId: "chatbot", 31 | clientVersion: "2.0.0" 32 | }, 33 | threatInfo: { 34 | threatTypes: ["MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION"], 35 | platformTypes: ["ANY_PLATFORM"], 36 | threatEntryTypes: ["URL"], 37 | threatEntries: [ 38 | { url: linktotest }, 39 | ] 40 | } 41 | } 42 | }, function (err, res, body) { 43 | if (err) { 44 | throw err; 45 | } 46 | if ("matches" in body) { 47 | if ("threatType" in body.matches[0]) { 48 | done(null, body.matches[0].threatType, body); 49 | return; 50 | } 51 | } 52 | if ("error" in body) { 53 | done(body.error, null, body); 54 | return; 55 | } 56 | done(null, null, body); 57 | }); 58 | } 59 | exports.checkLink = checkLink; 60 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chatbot", 3 | "version": "2.1.2", 4 | "description": "W.I.P All-in-One Discord Bot", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "mocha --reporter spec", 8 | "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec", 9 | "devCover": "npm run tsc && istanbul cover ./node_modules/mocha/bin/_mocha --report html -- -R spec", 10 | "tsc": "tsc ./ts/maindefs --outDir ./" 11 | }, 12 | "repository": "https://github.com/TolleyB-J/ChatBot", 13 | "author": "Tolley-BJ", 14 | "license": "MIT", 15 | "dependencies": { 16 | "apiai": "^4.0.3", 17 | "better-sqlite-pool": "^0.2.2", 18 | "capture-console": "^1.0.1", 19 | "chalk": "^2.4.2", 20 | "dblapi.js": "^2.3.0", 21 | "detect-newline": "^2.1.0", 22 | "discord.js": "^11.5.1", 23 | "enmap": "^4.8.4", 24 | "express": "^4.17.1", 25 | "get-urls": "^9.1.0", 26 | "giphy-js-sdk-core": "^1.0.6", 27 | "money": "^0.2.0", 28 | "ms": "^2.1.2", 29 | "random-number": "0.0.9", 30 | "request": "^2.88.0", 31 | "toml": "^3.0.0", 32 | "uws": "^100.0.1", 33 | "winston": "^2.4.3" 34 | }, 35 | "devDependencies": { 36 | "@types/node": "^11.9.6", 37 | "chai": "^4.1.2", 38 | "codacy-coverage": "^3.4.0", 39 | "codecov": "^3.2.0", 40 | "grunt": "^1.0.4", 41 | "grunt-run": "^0.8.1", 42 | "istanbul": "^0.4.5", 43 | "mocha": "^6.1.4", 44 | "mocha-lcov-reporter": "^1.3.0", 45 | "typescript": "^3.3.4000", 46 | "wtfnode": "^0.8.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /start_scripts/index.js: -------------------------------------------------------------------------------- 1 | var normalizedPath = require('path').join(__dirname); 2 | 3 | require('fs').readdirSync(normalizedPath).forEach((file) => { 4 | require('./' + file); 5 | }); -------------------------------------------------------------------------------- /start_scripts/loginit.js: -------------------------------------------------------------------------------- 1 | /* eslint no-inner-declarations: 0 */ 2 | const winston = require('winston'); 3 | const fs = require('fs'); 4 | const config = require('../mainDefs').config; 5 | var newfile = false; 6 | 7 | //Rotates Log File 8 | try { 9 | fs.accessSync('etc/passwd', fs.constants.R_OK | fs.constants.W_OK); 10 | newfile = true; 11 | fs.renameSync('./logs/main.log', './logs/oldmain.log'); 12 | } catch (err) { 13 | console.log('Creating new main.log'); 14 | if (!fs.existsSync('./logs')){ 15 | fs.mkdirSync('./logs'); 16 | } 17 | } 18 | 19 | if (config.Logging.debug) { 20 | function maintest() { 21 | winston.loggers.add('main', { 22 | console: { 23 | level: 'silly', 24 | colorize: true, 25 | label: 'MAIN', 26 | json: false 27 | }, 28 | file: { 29 | filename: './logs/main.log', 30 | level: 'silly', 31 | json: false, 32 | timestamp: true 33 | }, 34 | }); 35 | } 36 | module.exports = { 37 | maintest: maintest, 38 | }; 39 | maintest(); 40 | } else { 41 | //Define logger main 42 | function maintest() { 43 | winston.loggers.add('main', { 44 | console: { 45 | level: 'warn', 46 | colorize: true, 47 | label: 'MAIN', 48 | json: false 49 | }, 50 | file: { 51 | filename: './logs/main.log', 52 | level: 'silly', 53 | json: false, 54 | timestamp: true 55 | }, 56 | }); 57 | } 58 | module.exports = { 59 | maintest: maintest, 60 | }; 61 | maintest(); 62 | } 63 | 64 | /* 65 | //Define Logger DevLog 66 | function devlogtest() { 67 | winston.loggers.add('devlog', { 68 | console: { 69 | level: 'silly', 70 | colorize: 'true', 71 | label: 'DEBUG' 72 | } 73 | }) 74 | } 75 | //const devlog = winston.loggers.get('devlog'); 76 | //devlog.error('Hi') 77 | */ 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | if (newfile) { 86 | const main = winston.loggers.get('main'); 87 | main.info('Hello new log file :)'); 88 | } -------------------------------------------------------------------------------- /start_scripts/web.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const winston = require('winston'); 3 | const main = winston.loggers.get('main'); 4 | if (fs.existsSync('./test.txt') == false) { 5 | const express = require('express'); 6 | const app = express(); 7 | const port = 3000; 8 | 9 | app.get('/onlineCheck', (req, res) => res.send('ChatBot Running and functioning!')); 10 | 11 | app.listen(port, () => main.verbose(`Web server listening on port ${port}!`)); 12 | } -------------------------------------------------------------------------------- /test/functest.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node, mocha */ 2 | const wtf = require('wtfnode'); 3 | const expect = require('chai').expect; 4 | const funcs = require('../mainDefs'); 5 | 6 | describe('Check functions/variables from mainDefs.js', () => { 7 | it('Checks if textToArray works correctly', () => { 8 | const array = funcs.textToArray('./test/testarray.txt'); 9 | const expectedArray = ['item1', 10 | 'item2', 11 | 'item3', 12 | 'item 1 is cool', 13 | 'item 2 is cool', 14 | 'item 3 is cool', 15 | 'You are awesome!', 16 | 'If you are reading this you are probably contributing, if you are thanks!', 17 | 'this is some very long text to see if textToArray breaks when I make it too long blah blah blah I like cake and rice (not together), I dont know why I am telling you that. Why are you even reading this?']; 18 | expect(array).to.deep.equal(expectedArray); 19 | }); 20 | it('Checks if error is thrown when path is not a string for textToArray', () => { 21 | expect(() => funcs.textToArray({ path: 'Hello World' })).to.throw('Path supplied is not a string'); 22 | }); 23 | it('Checks if a safe site is reported as safe', (done) => { 24 | funcs.checkLink('https://google.com', (err, data, body) => { 25 | if (err) throw err; 26 | expect(body).to.deep.equal({}); 27 | done(); 28 | }); 29 | }); 30 | it('Checks if a unsafe site is reported as safe', (done) => { 31 | funcs.checkLink('http://malware.wicar.org/data/eicar.com', (err) => { 32 | if (err) throw err; 33 | done(); 34 | }); 35 | 36 | }); 37 | it('Checks if an error if thrown when checking a site using a invalid service URI', (done) => { 38 | expect(funcs.checkLink.bind(funcs, 'http://malware.wicar.org/data/eicar.com', (err) => { 39 | if (err) throw err; 40 | }, 'blah')).to.throw('Invalid URI "blah"'); 41 | done(); 42 | }); 43 | it('Checks if the Google Safe Browsing API returns an error when an invalid API key is used', (done) => { 44 | expect(funcs.checkLink('http://malware.wicar.org/data/eicar.com', (err, data, body) => { 45 | expect(body.error.message).to.contain('API key not valid'); 46 | done(); 47 | }, 'https://safebrowsing.googleapis.com/v4/threatMatches:find?key=boop')); 48 | 49 | }); 50 | it('Checks the config var', () => { 51 | const config = funcs.config; 52 | expect(config).to.be.a('object'); 53 | }); 54 | it('Checks the giphy var', () => { 55 | const giphy = funcs.giphy; 56 | expect(giphy).to.be.a('object'); 57 | }); 58 | }); 59 | wtf.dump(); 60 | -------------------------------------------------------------------------------- /test/log.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node, mocha */ 2 | const wtf = require('wtfnode'); 3 | const expect = require('chai').expect; 4 | const winston = require('winston'); 5 | const capcon = require('capture-console'); 6 | const config = require('../mainDefs').config; 7 | const loginit = require('../start_scripts/loginit'); 8 | 9 | 10 | describe('Winston Define', () => { 11 | it('Define main', () => { 12 | loginit.maintest(); 13 | }); 14 | }); 15 | require('../start_scripts/loginit'); 16 | const main = winston.loggers.get('main'); 17 | if (config.Logging.debug === true) { 18 | describe('Winston main Debug', () => { 19 | it('Print an error to main', () => { 20 | var stderr = capcon.captureStderr(() => { 21 | main.error('Error Test'); 22 | }); 23 | expect(stderr).to.contain('[MAIN] Error Test'); 24 | }); 25 | 26 | it('Print a warning to main', () => { 27 | var stdout = capcon.captureStdout(() => { 28 | main.warn('Warn Test'); 29 | }); 30 | expect(stdout).to.contain('[MAIN] Warn Test'); 31 | }); 32 | it('Print info to main', () => { 33 | var stdout = capcon.captureStdout(() => { 34 | main.info('Info Test'); 35 | }); 36 | expect(stdout).to.contain('[MAIN] Info Test'); 37 | }); 38 | 39 | /* it('Print debug to main', function () { 40 | var stdout = capcon.captureStdout(function scope() { 41 | main.debug('Debug Test') 42 | console.log('Hello World :)') 43 | }); 44 | expect(stdout).to.contain('debug: [DEBUG] Debug Test\r\n') 45 | });*/ 46 | 47 | it('Print vebose to main', () => { 48 | var stdout = capcon.captureStdout(() => { 49 | main.verbose('Verbose Test'); 50 | }); 51 | expect(stdout).to.contain('[MAIN] Verbose Test'); 52 | }); 53 | 54 | 55 | it('Print silly to main', () => { 56 | var stdout = capcon.captureStdout(() => { 57 | main.silly('Silly Test'); 58 | }); 59 | expect(stdout).to.contain('[MAIN] Silly Test'); 60 | }); 61 | }); 62 | } 63 | if (config.Logging.debug === false) { 64 | describe('Winston main', () => { 65 | it('Print an error to main', () => { 66 | var stderr = capcon.captureStderr(() => { 67 | main.error('Error Test'); 68 | }); 69 | expect(stderr).to.contain('[MAIN] Error Test'); 70 | }); 71 | 72 | it('Print a warning to main', () => { 73 | var stdout = capcon.captureStdout(() => { 74 | main.warn('Warn Test'); 75 | }); 76 | expect(stdout).to.contain('[MAIN] Warn Test'); 77 | }); 78 | }); 79 | } 80 | wtf.dump(); 81 | -------------------------------------------------------------------------------- /test/startup.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node, mocha */ 2 | const wtf = require('wtfnode'); 3 | const fs = require('fs'); 4 | const expect = require('chai').expect; 5 | fs.writeFileSync('./test.txt', 'Test active. When test completed please delete this file. :)'); 6 | const appjs = require('../app.js'); 7 | require('../start_scripts/'); 8 | 9 | describe('Bot Startup', () => { 10 | it('Initalize', () => { 11 | appjs.inittest(); 12 | }); 13 | it('Load main module', () => { 14 | appjs.loadModule('main'); 15 | }); 16 | it('Load moderation module', () => { 17 | appjs.loadModule('moderation'); 18 | }); 19 | it('Load fun module', () => { 20 | appjs.loadModule('fun'); 21 | }); 22 | it('Load serverConfig module', () => { 23 | appjs.loadModule('serverConfig'); 24 | }); 25 | it('Load giphy module', () => { 26 | appjs.loadModule('giphy'); 27 | }); 28 | it('Get error on load of a fake module', () => { 29 | expect(appjs.loadModule.bind(appjs, 'fake')).to.throw('Module Load Error'); 30 | }); 31 | it('Elevate Roles', () => { 32 | appjs.eletest(); 33 | }); 34 | it('Cleaning up', () => { 35 | fs.unlink('./test.txt', (err) => { 36 | if (err) throw err; 37 | }); 38 | }); 39 | }); 40 | wtf.dump(); -------------------------------------------------------------------------------- /test/testarray.txt: -------------------------------------------------------------------------------- 1 | item1 2 | item2 3 | item3 4 | item 1 is cool 5 | item 2 is cool 6 | item 3 is cool 7 | You are awesome! 8 | If you are reading this you are probably contributing, if you are thanks! 9 | this is some very long text to see if textToArray breaks when I make it too long blah blah blah I like cake and rice (not together), I dont know why I am telling you that. Why are you even reading this? -------------------------------------------------------------------------------- /test/testconfig.toml: -------------------------------------------------------------------------------- 1 | # ____ _ _____ __ _ 2 | # | _ \ | | / ____| / _(_) 3 | # | |_) | ___ | |_ | | ___ _ __ | |_ _ __ _ 4 | # | _ < / _ \| __| | | / _ \| '_ \| _| |/ _` | 5 | # | |_) | (_) | |_ | |___| (_) | | | | | | | (_| | 6 | # |____/ \___/ \__| \_____\___/|_| |_|_| |_|\__, | 7 | # __/ | 8 | # |___/ 9 | # 10 | # This is your ChatBot config file. Here you can customize you bot. 11 | # For more information on configuring your bot go to https://github.com/TolleyB-J/ChatBot 12 | # Note: The permlevels are: 13 | # 1 = Everyone 14 | # 2 = Moderators 15 | # 3 = Admins 16 | # 4 = Owner/Dev Users 17 | 18 | [Bot] 19 | # These are your primary settings for your bot 20 | 'token' = 'YOUR-BOT-TOKEN-HERE' # The token you get from https://discordapp.com/developers/applications/me 21 | 'prefix' = ';' # The prefix for your bot. e.g If my prefix was '-' I would do -help 22 | 'ownerid' = 'YOUR-ID-HERE' # Your account id here, this will give you full permissions for the bot. 23 | 24 | [Logging] 25 | # There are your settings of logging of console 26 | 'logfile' = 'latest.log' # The name of your log file 27 | 'debug' = false # Whether or not to enable extra logging in console 28 | 29 | [Roles] 30 | # These are the settings for you roles 31 | 'modrole' = 'MOD-ROLE-ID-HERE' # The role whitch you give to your admins 32 | 'adminrole' = 'ADMIN-ROLE-ID-HERE' # The role which you give to your moderators 33 | 'devusers' = ['ID1', 'ID2'] # WARNING: PUTTING A USER'S ID IN THE DEVUSERS ARRAY WILL GIVE THEM FULL PERMISSIONS, DO THIS WITH CAUTION 34 | 35 | # __ __ _ _ _____ __ _ 36 | # | \/ | | | | | / ____| / _(_) 37 | # | \ / | ___ __| |_ _| | ___ | | ___ _ __ | |_ _ __ _ 38 | # | |\/| |/ _ \ / _` | | | | |/ _ \ | | / _ \| '_ \| _| |/ _` | 39 | # | | | | (_) | (_| | |_| | | __/ | |___| (_) | | | | | | | (_| | 40 | # |_| |_|\___/ \__,_|\__,_|_|\___| \_____\___/|_| |_|_| |_|\__, | 41 | # __/ | 42 | # |___/ 43 | 44 | 45 | [Moderation] 46 | # The config for the moderation module 47 | 'enable' = true # Whether or not to enable moderation commands 48 | 'banlevel' = 4 # Permlevel for ban command 49 | 'unbanlevel' = 3 # Permlevel for unban command 50 | 'kicklevel' = 3 # Permlevel for kick command 51 | 'lockdownlevel' = 3 # Permlevel for lockdown command 52 | 'mutelevel' = 2 # Permlevel for mute command 53 | 'warnlevel' = 2 # Permlevel for warn command 54 | 'purgelevel' = 2 # Permlevel for mute command 55 | 'logid' = 'YOUR-LOG-ID-HERE' # The id for the moderation log channel 56 | 57 | [Fun] 58 | # NOTE: You can not change the permlevel of the fun commands you may only enable/disable them. 59 | 'enable' = true # Whether or not to enable fun commands 60 | # Working on adding more options 61 | 62 | [Giphy] 63 | # Enable the gifhy module 64 | # NOTE: IF YOU PLAN TO USE THIS BOT ON MORE THAN 2 SERVERS 65 | # APPLY FOR A PRODUCTION KEY. FOR MORE INFO GO TO https://github.com/TolleyB-J/ChatBot 66 | 'enable' = false # Whether or not to enable the giphy commands 67 | 'apikey' = 'YOUR-API-KEY-HERE' 68 | 69 | [Botcmd] 70 | # The config for the bot commands 71 | # This module must be enabled 72 | 'setgameenable' = 'true' # Whether to enable the the setgame command 73 | 'setgamelevel' = '4' # Permlevel for setgame command 74 | 'bootgame' = 'This bot is by TolleyB-J' # The bots default game on boot 75 | 76 | [Stats] 77 | # The the config for the server stats module - Here's what is looks like https://i.imgur.com/nJyvhWp.png 78 | 'enable' = false # Whether or not to enable the Stats module 79 | 'tusersid' = 'YOUR-TOTAL-USERS-ID-HERE' # Put the id of the voice channel for Total Users (dosent have to be called total users) 80 | 'tuserstext' = 'Total Users:' # The text before the number of users 81 | 'botsid' = 'YOUR-BOTS-ID-HERE' # Same as tusersid exept for bots 82 | 'botstext' = 'Bot Count:' # Same as tuserstext exept for bots 83 | 'memberid' = 'YOUR-MEMBERS-ID-HERE' # Same as tusersid but for members 84 | 'membertext' = 'Member Count:' # Same as tuserstext but for members 85 | 'updatepermlevel' = '4' # Permlevel for the updatestats command 86 | 87 | [Utilities] 88 | # The config for the utilities commands 89 | 'enable' = true # Whether or not to enable fun commands 90 | # Working on adding more options 91 | 92 | [PerServerDB] 93 | # The configuration for the per-server settings database 94 | 'enable' = false 95 | 96 | # ______ _ __ _____ __ _ _ 97 | # | ____| | | / _| / ____| / _(_) | | 98 | # | |__ _ __ __| | ___ | |_ | | ___ _ __ | |_ _ __ _| | 99 | # | __| | '_ \ / _` | / _ \| _| | | / _ \| '_ \| _| |/ _` | | 100 | # | |____| | | | (_| | | (_) | | | |___| (_) | | | | | | | (_| |_| 101 | # |______|_| |_|\__,_| \___/|_| \_____\___/|_| |_|_| |_|\__, (_) 102 | # __/ | 103 | # |___/ 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | version = '2.0.0' # DO NOT EDIT THIS 113 | test = true # DO NOT EDIT THIS -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6 4 | }, 5 | "defaultSeverity": "error", 6 | "extends": [ 7 | "tslint:recommended" 8 | ], 9 | "jsRules": {}, 10 | "rules": { 11 | "no-console": false, 12 | "no-require-imports": false, 13 | "no-var-requires": false, 14 | "object-literal-sort-keys": false, 15 | "max-line-length": false 16 | }, 17 | "rulesDirectory": [] 18 | } -------------------------------------------------------------------------------- /util/chatHandler.js: -------------------------------------------------------------------------------- 1 | const apiai = require('apiai'); 2 | const chat = apiai('e31ba42e7b5f43f093842cd860f62f56'); 3 | const rn = require('random-number'); 4 | 5 | var numOptions = { 6 | min: 200 7 | , max: 1000 8 | , integer: true 9 | }; 10 | exports.run = async (client, message) => { 11 | 12 | const request = chat.textRequest(message.content, { // here we introduce the "request" to the computer 13 | sessionId: message.author.id 14 | }); 15 | 16 | request.on('error', (error) => { 17 | console.log(`${message.guild.name} (${message.guild.id}) made an oopsie: ${error}`); // log the error, I don't know what logger do you use 18 | }); 19 | 20 | request.on('response', async (response) => { // here we async initialize the request 21 | const reply = response.result.fulfillment.speech; // grab the response from DialogFlow API 22 | await message.channel.startTyping(); // nice effect to make the bot look like it's "typing" 23 | await setTimeout(() => { 24 | message.channel.send(`${reply}`).catch(console.error); // send the response 25 | message.channel.stopTyping(); 26 | }, rn(numOptions)); 27 | }); 28 | 29 | request.end(); // end the request to make it tidy - we no longer need this 30 | }; 31 | -------------------------------------------------------------------------------- /util/eventLoader.js: -------------------------------------------------------------------------------- 1 | const reqEvent = (event) => require('../events/' + event); 2 | module.exports = (client, dbl) => { 3 | client.on('ready', () => reqEvent('ready')(client)); 4 | client.on('reconnecting', () => reqEvent('reconnecting')(client)); 5 | client.on('disconnect', reqEvent('disconnect')); 6 | client.on('message', reqEvent('message')); 7 | client.on('guildBanAdd', reqEvent('guildBanAdd')); 8 | client.on('guildBanRemove', reqEvent('guildBanRemove')); 9 | client.on('guildCreate', reqEvent('guildCreate')); 10 | client.on('guildDelete', reqEvent('guildDelete')); 11 | client.on('guildMemberAdd', reqEvent('guildMemberAdd')); 12 | if (dbl !== undefined) {dbl.on('posted', reqEvent('dblPosted'));} 13 | }; --------------------------------------------------------------------------------