diff --git a/README.md b/README.md index 561ac74b..5061176c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Xiao is a Discord bot coded in JavaScript with 7. Run `npm i -g pm2` to install PM2. 8. Run `pm2 start Xiao.js --name xiao` to run the bot. -## Commands (336) +## Commands (335) ### Utility: * **eval:** Executes JavaScript code. @@ -169,7 +169,6 @@ Xiao is a Discord bot coded in JavaScript with * **esrb:** Searches ESRB for your query. * **flickr:** Searches Flickr for your query. * **forecast:** Responds with the seven-day forecast for a specific location. -* **gelbooru:** Responds with an image from Gelbooru, with optional query. * **giphy:** Searches Giphy for your query. * **github:** Responds with information on a GitHub repository. * **google-autofill:** Responds with a list of the Google Autofill results for a particular query. diff --git a/commands/search/gelbooru.js b/commands/search/gelbooru.js deleted file mode 100644 index 97504d75..00000000 --- a/commands/search/gelbooru.js +++ /dev/null @@ -1,40 +0,0 @@ -const Command = require('../../structures/Command'); -const request = require('node-superfetch'); - -module.exports = class GelbooruCommand extends Command { - constructor(client) { - super(client, { - name: 'gelbooru', - group: 'search', - memberName: 'gelbooru', - description: 'Responds with an image from Gelbooru, with optional query.', - nsfw: true, - args: [ - { - key: 'query', - prompt: 'What image would you like to search for?', - type: 'string', - default: '' - } - ] - }); - } - - async run(msg, { query }) { - try { - const { body } = await request - .get('https://gelbooru.org/index.php') - .query({ - page: 'dapi', - s: 'post', - q: 'index', - json: 1, - tags: query, - limit: 200 - }); - return msg.say(body[Math.floor(Math.random() * body.length)].file_url); - } catch (err) { - return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); - } - } -}; diff --git a/commands/search/konachan.js b/commands/search/konachan.js index 14c6e9b1..8dd43ad4 100644 --- a/commands/search/konachan.js +++ b/commands/search/konachan.js @@ -29,7 +29,7 @@ module.exports = class KonachanCommand extends Command { limit: 1 }); if (!body.length || !body[0].file_url) return msg.say('Could not find any results.'); - return msg.say(`https:${body[0].file_url}`); + return msg.say(body[0].file_url); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); }