Remove App Store Search, Fixes in Info

This commit is contained in:
Daniel Odendahl Jr
2017-04-05 20:53:26 +00:00
parent f818e3dcc9
commit 4acc6b2f65
6 changed files with 6 additions and 72 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ You can add XiaoBot to your server with [this link](https://discordapp.com/oauth
You can join the home server with [this link](https://discord.gg/fqQF8mc).
## Modules & APIs
[discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [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), [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/), [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), [Urban Dictionary API](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB API](http://www.omdbapi.com/), [Yahoo Weather API](https://developer.yahoo.com/weather/), [iTunes Store Search API](https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/)
[discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [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), [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/), [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), [Urban Dictionary API](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB API](http://www.omdbapi.com/), [Yahoo Weather API](https://developer.yahoo.com/weather/)
## Self-Hosting
You can Self-Host the bot easily, provided you have API keys and a Discord Bot Token. [Node.js](https://nodejs.org/en/) is also required, with at least version 7.8.0 recommended.
+2 -3
View File
@@ -26,14 +26,13 @@ module.exports = class InfoCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
const guilds = await this.client.shard.fetchClientValues('guilds.size');
const vCConnections = await this.client.shard.fetchClientValues('voiceConnections.size');
const embed = new Discord.RichEmbed()
.setColor(0x00AE86)
.setFooter(`©2017 dragonfire535 | Version ${pkg.version} | Created ${moment.duration(Date.now() - this.client.user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago!`)
.addField('Servers',
`${this.client.guilds.size} / ${guilds.reduce((prev, val) => prev + val, 0)}`, true)
.addField('Shards',
`${this.client.options.shardCount} (This is Shard: ${this.client.shard.id})`, true)
this.client.options.shardCount, true)
.addField('Commands',
config.commandCount, true)
.addField('Owner',
@@ -51,7 +50,7 @@ module.exports = class InfoCommand extends commando.Command {
.addField('Modules',
'[commando](https://github.com/Gawdl3y/discord.js-commando), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [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), [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/)')
.addField('APIs',
'[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), [Urban Dictionary API](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB API](http://www.omdbapi.com/), [Yahoo Weather API](https://developer.yahoo.com/weather/), [iTunes Store Search API](https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-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), [Urban Dictionary API](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB API](http://www.omdbapi.com/), [Yahoo Weather API](https://developer.yahoo.com/weather/)');
return message.embed(embed);
}
};
-63
View File
@@ -1,63 +0,0 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('superagent');
module.exports = class AppStoreCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'appstore',
aliases: [
'app-store',
'app'
],
group: 'search',
memberName: 'appstore',
description: 'Searches the App Store for your query. (;appstore DragonVale)',
examples: [';appstore DragonVale'],
args: [{
key: 'query',
prompt: 'What would you like to search the App Store for?',
type: 'string'
}]
});
}
async run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log(`[Command] ${message.content}`);
const query = args.query;
try {
const response = await request
.get('https://itunes.apple.com/search')
.query({
term: query,
country: 'us',
entity: 'software',
limit: 1
});
const parsedResponse = JSON.parse(response.text);
const data = parsedResponse.results[0];
const embed = new Discord.RichEmbed()
.setColor(0x1BA3F7)
.setAuthor('App Store', 'https://upload.wikimedia.org/wikipedia/en/1/1f/App_Store_Logo.png')
.setTitle(data.trackName)
.setURL(data.trackViewUrl)
.setDescription(data.description.substr(0, 1900))
.setThumbnail(data.artworkUrl512)
.addField('**Version:**',
data.version, true)
.addField('**Seller:**',
data.artistName, true)
.addField('**Price:**',
`${data.formattedPrice} (USD)`, true)
.addField('**Rated:**',
data.contentAdvisoryRating, true);
return message.embed(embed);
}
catch (err) {
return message.say(':x: Error! Something went wrong!');
}
}
};
+1 -2
View File
@@ -48,12 +48,11 @@
<li><a href="https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation">Urban Dictionary API</a></li>
<li><a href="http://www.omdbapi.com/">OMDB API</a></li>
<li><a href="https://developer.yahoo.com/weather/">Yahoo Weather API</a></li>
<li><a href="https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/">iTune Store Search API</a></li>
</ul>
<h2>Information</h2>
<ul>
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
<li>Command Count: 114</li>
<li>Command Count: 113</li>
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
</ul>
</div>
+1 -2
View File
@@ -96,13 +96,12 @@
<li><a href="https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation">Urban Dictionary API</a></li>
<li><a href="http://www.omdbapi.com/">OMDB API</a></li>
<li><a href="https://developer.yahoo.com/weather/">Yahoo Weather API</a></li>
<li><a href="https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/">iTune Store Search API</a></li>
</ul>
</ul>
<h2>Information</h2>
<ul>
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
<li>Command Count: 114</li>
<li>Command Count: 113</li>
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
</ul>
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "19.0.0",
"version": "19.1.0",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"repository": {