mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Remove Cleverbot
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"allowed": {
|
|
||||||
"242699360352206850": "242699360352206850",
|
|
||||||
"228313559329669120": "228313559329669120",
|
|
||||||
"219199801177145345": "219199801177145345",
|
|
||||||
"163774631952646144": "163774631952646144",
|
|
||||||
"234318196893548545": "234318196893548545",
|
|
||||||
"223639379594313728": "223639379594313728",
|
|
||||||
"252755193739870208": "252755193739870208",
|
|
||||||
"235218353579491328": "235218353579491328",
|
|
||||||
"230395430024904704": "230395430024904704"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -57,11 +57,11 @@ module.exports = class InfoCommand extends commando.Command {
|
|||||||
.addField('Library',
|
.addField('Library',
|
||||||
"[discord.js](https://discord.js.org/#/) / [commando](https://github.com/Gawdl3y/discord.js-commando)", true)
|
"[discord.js](https://discord.js.org/#/) / [commando](https://github.com/Gawdl3y/discord.js-commando)", true)
|
||||||
.addField('Modules',
|
.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',
|
.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)")
|
"[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',
|
.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',
|
.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)")
|
"[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',
|
.addField('My Server',
|
||||||
|
|||||||
@@ -7,12 +7,6 @@ const client = new commando.Client({
|
|||||||
owner: config.owner,
|
owner: config.owner,
|
||||||
disableEveryone: true
|
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');
|
const path = require('path');
|
||||||
|
|
||||||
client.registry
|
client.registry
|
||||||
@@ -38,24 +32,6 @@ client.registry
|
|||||||
})
|
})
|
||||||
.registerCommandsIn(path.join(__dirname, 'commands'));
|
.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) => {
|
client.on('guildMemberAdd', (member) => {
|
||||||
if (member.guild.id !== config.server) return;
|
if (member.guild.id !== config.server) return;
|
||||||
member.addRole(member.guild.roles.find('name', 'Members'));
|
member.addRole(member.guild.roles.find('name', 'Members'));
|
||||||
|
|||||||
@@ -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",
|
"name": "xiaobot",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user