diff --git a/.env.example b/.env.example index 093dfd30..a6fe6af8 100644 --- a/.env.example +++ b/.env.example @@ -47,7 +47,6 @@ IMGUR_KEY= OPENWEATHERMAP_KEY= OSU_KEY= PERSONAL_GOOGLE_CALENDAR_ID= -SOUNDCLOUD_KEY= STACKOVERFLOW_KEY= TENOR_KEY= TMDB_KEY= diff --git a/README.md b/README.md index a9e150a1..2e49c737 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 408 +Total: 407 ### Utility: @@ -331,7 +331,6 @@ Total: 408 * **rotten-tomatoes:** Searches Rotten Tomatoes for your query. * **rule:** Responds with a rule of the internet. * **safebooru:** Responds with an image from Safebooru, with optional query. -* **soundcloud:** Searches SoundCloud for your query. * **stack-overflow:** Searches Stack Overflow for your query. * **steam:** Searches Steam for your query. * **stocks:** Responds with the current stocks for a company. @@ -1099,8 +1098,6 @@ here. * steam-card ([Template](https://www.deviantart.com/sinkillerj/art/Steam-Trading-Card-Template-GIMP-372156984)) - [SMWiki](http://www.smwiki.net/) * smw-level ([Level Name Data](http://old.smwiki.net/wiki/List_of_Super_Mario_World_levels)) -- [SoundCloud](https://soundcloud.com/) - * soundcloud ([API](https://developers.soundcloud.com/)) - [SPAM Brand](https://www.spam.com/) * spam (Image) - [speak lolcat](https://speaklolcat.com/) diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js deleted file mode 100644 index 8e718035..00000000 --- a/commands/search/soundcloud.js +++ /dev/null @@ -1,61 +0,0 @@ -const Command = require('../../structures/Command'); -const moment = require('moment'); -const { MessageEmbed } = require('discord.js'); -const request = require('node-superfetch'); -const { shorten, formatNumber, embedURL } = require('../../util/Util'); -const { SOUNDCLOUD_KEY } = process.env; - -module.exports = class SoundcloudCommand extends Command { - constructor(client) { - super(client, { - name: 'soundcloud', - aliases: ['scloud', 'sc'], - group: 'search', - memberName: 'soundcloud', - description: 'Searches SoundCloud for your query.', - clientPermissions: ['EMBED_LINKS'], - credit: [ - { - name: 'SoundCloud', - url: 'https://soundcloud.com/', - reason: 'API', - reasonURL: 'https://developers.soundcloud.com/' - } - ], - args: [ - { - key: 'query', - prompt: 'What song would you like to search for?', - type: 'string' - } - ] - }); - } - - async run(msg, { query }) { - try { - const { body } = await request - .get('http://api.soundcloud.com/tracks') - .query({ - q: query, - client_id: SOUNDCLOUD_KEY - }); - if (!body.length) return msg.say('Could not find any results.'); - const data = body[0]; - const embed = new MessageEmbed() - .setColor(0xFF5500) - .setAuthor('SoundCloud', 'https://i.imgur.com/ctft3v7.png', 'https://soundcloud.com/') - .setURL(data.permalink_url) - .setThumbnail(data.artwork_url) - .setTitle(data.title) - .setDescription(data.description ? shorten(data.description) : 'No description available.') - .addField('❯ Artist', embedURL(data.user.username, data.user.permalink_url), true) - .addField('❯ Release Date', moment.utc(new Date(data.created_at)).format('MM/DD/YYYY'), true) - .addField('❯ Genre', data.genre || '???', true) - .addField('❯ Likes', formatNumber(data.likes_count), true); - return msg.embed(embed); - } catch (err) { - return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); - } - } -}; diff --git a/package.json b/package.json index 1431777d..78721535 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "113.22.3", + "version": "114.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {