This commit is contained in:
Daniel Odendahl Jr
2017-05-06 05:44:43 +00:00
parent e911865866
commit ec27e78286
9 changed files with 41 additions and 72 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ You can join the home server with [this link](https://discord.gg/fqQF8mc).
[discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [superagent](https://github.com/visionmedia/superagent), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/), [sequelize](http://docs.sequelizejs.com/en/v3/), [pg](https://github.com/brianc/node-postgres)
## APIs
[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [rrrather](http://www.rrrather.com/botapi), [SoundCloud](https://developers.soundcloud.com/), [random.cat](http://random.cat/), [random.dog](https://random.dog/), [fixer.io](http://fixer.io/), [cleverbot.io](https://cleverbot.io/)
[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [rrrather](http://www.rrrather.com/botapi), [SoundCloud](https://developers.soundcloud.com/), [random.cat](http://random.cat/), [random.dog](https://random.dog/), [fixer.io](http://fixer.io/)
## Licensing
The bot is licensed under an [ISC License](https://opensource.org/licenses/ISC). See the file `LICENSE.md` for more information.
-42
View File
@@ -1,42 +0,0 @@
const { Command } = require('discord.js-commando');
const request = require('superagent');
module.exports = class CleverbotCommand extends Command {
constructor(client) {
super(client, {
name: 'cleverbot',
aliases: [
'clevs',
'chat'
],
group: 'random',
memberName: 'cleverbot',
description: 'Talk to Cleverbot.',
args: [
{
key: 'text',
prompt: 'What would you like to say to Cleverbot?',
type: 'string',
parse: text => encodeURIComponent(text)
}
]
});
}
async run(msg, args) {
const { text } = args;
try {
const { body } = await request
.post('https://cleverbot.io/1.0/ask')
.send({
user: process.env.CLEVS_USER,
key: process.env.CLEVS_KEY,
nick: process.env.CLEVS_NICK,
text
});
return msg.reply(body.response);
} catch(err) {
return msg.say(`An Error Occurred: ${err}`);
}
}
};
+39 -1
View File
@@ -48,7 +48,45 @@ module.exports = class InfoCommand extends Command {
.addField('Node Version',
process.version, true)
.addField('Library',
'[discord.js](https://discord.js.org/#/)[-commando](https://github.com/Gawdl3y/discord.js-commando)', true);
'[discord.js](https://discord.js.org/#/)', true)
.addField('Modules',
oneLine`
[commando](https://github.com/Gawdl3y/discord.js-commando),
[zalgoize](https://github.com/clux/zalgolize),
[superagent](https://github.com/visionmedia/superagent),
[mathjs](http://mathjs.org/),
[moment](http://momentjs.com),
[moment-duration-format](https://github.com/jsmreese/moment-duration-format),
[jimp](https://github.com/oliver-moran/jimp),
[cheerio](https://cheerio.js.org/),
[sequelize](http://docs.sequelizejs.com/en/v3/),
[pg](https://github.com/brianc/node-postgres)
`
)
.addField('APIs',
oneLine`
[Wattpad](https://developer.wattpad.com/docs/api),
[Wordnik](http://developer.wordnik.com/docs.html),
[osu!](https://osu.ppy.sh/p/api),
[memegen.link](https://memegen.link/),
[Yugioh Prices](http://docs.yugiohprices.apiary.io/#),
[YouTube Data](https://developers.google.com/youtube/v3/),
[Discord Bots](https://bots.discord.pw/api),
[Today in History](http://history.muffinlabs.com/#api),
[jService](http://jservice.io/),
[Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation),
[OMDB](http://www.omdbapi.com/),
[Yahoo Weather](https://developer.yahoo.com/weather/),
[Wikipedia](https://en.wikipedia.org/w/api.php),
[Google Static Maps](https://developers.google.com/maps/documentation/static-maps/),
[Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API),
[rrrather](http://www.rrrather.com/botapi),
[SoundCloud](https://developers.soundcloud.com/),
[random.cat](http://random.cat/),
[random.dog](https://random.dog/),
[fixer.io](http://fixer.io/)
`
);
return msg.embed(embed);
}
};
-1
View File
@@ -52,7 +52,6 @@
<li><a href="http://random.cat/">random.cat</a></li>
<li><a href="https://random.dog/">random.dog</a></li>
<li><a href="http://fixer.io/">fixer.io</a></li>
<li><a href="https://cleverbot.io/">cleverbot.io</a></li>
</ul>
<h2>Information</h2>
<ul>
-1
View File
@@ -46,7 +46,6 @@
<li>YuGiOh! Card Data</li>
</ul>
<li>LMGTFY Link Generation!</li>
<li>Cleverbot!</li>
<li>Binary, Morse, Pirate, and Temmie Translators!</li>
<li>Cowsay, Embed, Reverse, Zalgo, and Upside Down Text!</li>
<li>Customizable Prefix!</li>
-2
View File
@@ -43,7 +43,6 @@
<li>YuGiOh! Card Data</li>
</ul>
<li>LMGTFY Link Generation!</li>
<li>Cleverbot!</li>
<li>Binary, Morse, Pirate, and Temmie Translators!</li>
<li>Cowsay, Embed, Reverse, Zalgo, and Upside Down Text!</li>
<li>Customizable Prefix!</li>
@@ -96,7 +95,6 @@
<li><a href="http://random.cat/">random.cat</a></li>
<li><a href="https://random.dog/">random.dog</a></li>
<li><a href="http://fixer.io/">fixer.io</a></li>
<li><a href="https://cleverbot.io/">cleverbot.io</a></li>
</ul>
<h2>Information</h2>
<ul>
-6
View File
@@ -7,13 +7,7 @@ const client = new CommandoClient({
unknownCommandResponse: false
});
const path = require('path');
const { carbon, discordBots } = require('./structures/Stats');
const Cleverbot = require('./structures/Cleverbot');
const clevs = new Cleverbot();
clevs.create();
const SequelizeProvider = require('./providers/Sequelize');
const Database = require('./structures/PostgreSQL');
const database = new Database();
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "18.4.0",
"version": "18.3.1",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"scripts": {
-17
View File
@@ -1,17 +0,0 @@
const request = require('superagent');
class Cleverbot {
create() {
request
.post('https://cleverbot.io/1.0/create')
.send({
user: process.env.CLEVS_USER,
key: process.env.CLEVS_KEY,
nick: process.env.CLEVS_NICK
})
.then(response => console.log(`[Cleverbot] Created with nick: ${response.body.nick}`))
.catch(err => console.error(`[Cleverbot] Failed to create: ${err}`));
}
}
module.exports = Cleverbot;