From 1caab4a9af207c4ca6ab0d4934769403abf4f8f3 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 1 Apr 2017 15:20:44 +0000 Subject: [PATCH] Remove Cleverbot --- clevusers.json | 13 ------------- commands/botinfo/info.js | 4 ++-- index.js | 24 ----------------------- package.json | 41 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 clevusers.json diff --git a/clevusers.json b/clevusers.json deleted file mode 100644 index 039fd266..00000000 --- a/clevusers.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "allowed": { - "242699360352206850": "242699360352206850", - "228313559329669120": "228313559329669120", - "219199801177145345": "219199801177145345", - "163774631952646144": "163774631952646144", - "234318196893548545": "234318196893548545", - "223639379594313728": "223639379594313728", - "252755193739870208": "252755193739870208", - "235218353579491328": "235218353579491328", - "230395430024904704": "230395430024904704" - } -} diff --git a/commands/botinfo/info.js b/commands/botinfo/info.js index b79e99c5..dbdd4410 100644 --- a/commands/botinfo/info.js +++ b/commands/botinfo/info.js @@ -57,11 +57,11 @@ module.exports = class InfoCommand extends commando.Command { .addField('Library', "[discord.js](https://discord.js.org/#/) / [commando](https://github.com/Gawdl3y/discord.js-commando)", true) .addField('Modules', - "[cleverbot-node](https://github.com/fojas/cleverbot-node), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [urban](https://github.com/mvrilo/urban), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [yahoo-weather](https://github.com/mamal72/node-yahoo-weather), [imdb-api](https://github.com/worr/node-imdb-api), [string-to-binary](https://www.npmjs.com/package/string-to-binary), [roman-numeral-converter-mmxvi](https://github.com/Cein-Markey/roman-numeral-conversion-library), [cowsay](https://github.com/piuccio/cowsay), [morse](https://github.com/ecto/morse)") + "[pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [urban](https://github.com/mvrilo/urban), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [yahoo-weather](https://github.com/mamal72/node-yahoo-weather), [imdb-api](https://github.com/worr/node-imdb-api), [string-to-binary](https://www.npmjs.com/package/string-to-binary), [roman-numeral-converter-mmxvi](https://github.com/Cein-Markey/roman-numeral-conversion-library), [cowsay](https://github.com/piuccio/cowsay), [morse](https://github.com/ecto/morse)") .addField('Utility Modules', "[superagent](https://github.com/visionmedia/superagent), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [opusscript](https://github.com/abalabahaha/opusscript), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/), [sherlockjs](https://github.com/maytis/sherlockjs)") .addField('APIs', - "[Cleverbot API](https://www.cleverbot.com/api/), [Wattpad API](https://developer.wattpad.com/docs/api), [Wordnik API](http://developer.wordnik.com/docs.html), [osu! API](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices API](http://docs.yugiohprices.apiary.io/#), [YouTube Data API](https://developers.google.com/youtube/v3/), [Yoda Speak API](https://market.mashape.com/ismaelc/yoda-speak), [Discord Bots API](https://bots.discord.pw/api), [Today in History API](http://history.muffinlabs.com/#api), [jService API](http://jservice.io/), [Strawpoll API](https://github.com/strawpoll/strawpoll/wiki/API)") + "[Wattpad API](https://developer.wattpad.com/docs/api), [Wordnik API](http://developer.wordnik.com/docs.html), [osu! API](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices API](http://docs.yugiohprices.apiary.io/#), [YouTube Data API](https://developers.google.com/youtube/v3/), [Yoda Speak API](https://market.mashape.com/ismaelc/yoda-speak), [Discord Bots API](https://bots.discord.pw/api), [Today in History API](http://history.muffinlabs.com/#api), [jService API](http://jservice.io/), [Strawpoll API](https://github.com/strawpoll/strawpoll/wiki/API)") .addField('Other Credit', "[Heroku](https://www.heroku.com/), [Cloud9](https://c9.io/), [heroku-buildpack-ffmpeg-latest](https://elements.heroku.com/buildpacks/jonathanong/heroku-buildpack-ffmpeg-latest)") .addField('My Server', diff --git a/index.js b/index.js index f4b7c896..28c866b1 100644 --- a/index.js +++ b/index.js @@ -7,12 +7,6 @@ const client = new commando.Client({ owner: config.owner, disableEveryone: true }); -const Cleverbot = require('cleverbot-node'); -const cleverbot = new Cleverbot; -cleverbot.configure({ - botapi: config.clevkey -}); -const clevusers = require('./clevusers.json'); const path = require('path'); client.registry @@ -38,24 +32,6 @@ client.registry }) .registerCommandsIn(path.join(__dirname, 'commands')); -client.on('message', (message) => { - if (message.author.bot) return; - if (message.channel.type === 'dm') return; - if (message.content.startsWith(`<@${client.user.id}>`)) { - if (message.guild.id === config.server || message.guild.id === config.personalServer || message.author.id === config.owner) { - if (message.author.id === clevusers.allowed[message.author.id]) { - let cleverMessage = message.content.split(" ").slice(1).join(" "); - console.log(`[Cleverbot] ${cleverMessage}`); - message.channel.startTyping(); - cleverbot.write(cleverMessage, function(response) { - message.reply(response.output); - message.channel.stopTyping(); - }); - } - } - } -}); - client.on('guildMemberAdd', (member) => { if (member.guild.id !== config.server) return; member.addRole(member.guild.roles.find('name', 'Members')); diff --git a/package.json b/package.json index d4dbad14..7cd35540 100644 --- a/package.json +++ b/package.json @@ -1,3 +1,44 @@ +{ + "name": "xiaobot", + "version": "1.0.0", + "description": "A Discord Bot", + "main": "shardingmanager.js", + "repository": { + "type": "git", + "url": "git+https://dragonfire535@bitbucket.org/dragonfire535/xiaobot.git" + }, + "scripts": { + "start": "node shardingmanager.js" + }, + "engines": { + "node": "7.8.0" + }, + "author": "dragonfire535", + "license": "ISC", + "dependencies": { + "Sherlock": "github:neilgupta/Sherlock", + "cheerio": "^0.22.0", + "cowsay": "^1.1.9", + "discord.js": "github:hydrabolt/discord.js#1cb227d6d845318bee47916e9e429ae094c4936a", + "discord.js-commando": "github:gawdl3y/discord.js-commando", + "google-translate-api": "^2.2.2", + "hepburn": "^1.0.0", + "imdb-api": "^2.2.1", + "jimp": "^0.2.27", + "mathjs": "^3.10.0", + "moment": "^2.17.1", + "moment-duration-format": "^1.3.0", + "morse": "^0.1.0", + "opusscript": "0.0.3", + "pirate-speak": "^1.0.1", + "roman-numeral-converter-mmxvi": "^1.0.5", + "string-to-binary": "^0.1.2", + "superagent": "^3.5.1", + "urban": "^0.3.1", + "yahoo-weather": "^2.2.2", + "zalgolize": "^1.2.4" + } +} { "name": "xiaobot", "version": "1.0.0",