From 045fec44481af3ed5973b3cbcc9858516ca99449 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 24 May 2017 18:05:16 +0000 Subject: [PATCH] Remove IMDB --- commands/games/quiz.js | 3 +-- commands/search/imdb.js | 60 ----------------------------------------- html/carbonfeat.html | 1 - html/discordbots.html | 1 - package.json | 2 +- 5 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 commands/search/imdb.js diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 2278db0a..b8514c34 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -30,8 +30,7 @@ module.exports = class QuizCommand extends Command { const embed = new RichEmbed() .setTitle('You have **15** seconds to answer this question:') .setDescription(stripIndents` - **Category: ${decodeURIComponent(body.results[0].category)}** - **Difficulty: ${decodeURIComponent(body.results[0].difficulty)}** + **${decodeURIComponent(body.results[0].category)}** True or False: ${decodeURIComponent(body.results[0].question)} `); msg.embed(embed); diff --git a/commands/search/imdb.js b/commands/search/imdb.js deleted file mode 100644 index 3f06fc9e..00000000 --- a/commands/search/imdb.js +++ /dev/null @@ -1,60 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { RichEmbed } = require('discord.js'); -const snekfetch = require('snekfetch'); - -module.exports = class IMDBCommand extends Command { - constructor(client) { - super(client, { - name: 'imdb', - group: 'search', - memberName: 'imdb', - description: 'Searches IMDB for a specified movie.', - args: [ - { - key: 'query', - prompt: 'What movie or TV Show would you like to search for?', - type: 'string' - } - ] - }); - } - - async run(msg, args) { - if (msg.channel.type !== 'dm') - if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return msg.say('This Command requires the `Embed Links` Permission.'); - const { query } = args; - try { - const { body } = await snekfetch - .get('http://www.omdbapi.com/') - .query({ - t: query, - plot: 'full' - }); - if (body.Error) throw new Error('No Results.'); - const embed = new RichEmbed() - .setColor(0xDBA628) - .setAuthor('IMDB', 'https://i.imgur.com/sXwwIQs.png') - .setURL(`http://www.imdb.com/title/${body.imdbID}`) - .setTitle(`${body.Title} (${body.imdbRating} Score)`) - .setDescription(body.Plot.substr(0, 2000)) - .addField('Genres', - body.Genre) - .addField('Year', - body.Year, true) - .addField('Rated', - body.Rated, true) - .addField('Runtime', - body.Runtime, true) - .addField('Directors', - body.Director) - .addField('Writers', - body.Writer) - .addField('Actors', - body.Actors); - return msg.embed(embed); - } catch (err) { - return msg.say(`${err.name}: ${err.message}`); - } - } -}; diff --git a/html/carbonfeat.html b/html/carbonfeat.html index 7ec90941..c6a5bb51 100644 --- a/html/carbonfeat.html +++ b/html/carbonfeat.html @@ -40,7 +40,6 @@
  • Google
  • Discord Bots
  • Yahoo Weather
  • -
  • IMDB
  • Google Maps
  • Neopet Images
  • Osu!
  • diff --git a/html/discordbots.html b/html/discordbots.html index 3095a260..f37fcc84 100644 --- a/html/discordbots.html +++ b/html/discordbots.html @@ -37,7 +37,6 @@
  • Google
  • Discord Bots
  • Yahoo Weather
  • -
  • IMDB
  • Google Maps
  • Neopet Images
  • Osu!
  • diff --git a/package.json b/package.json index 1b635bf2..12fd2be0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "20.1.2", + "version": "21.0.0", "description": "A Discord Bot", "main": "Shard.js", "scripts": {