diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 5f67cf4e..957d6da9 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -19,7 +19,7 @@ module.exports = class WhosThatPokemonCommand extends Command { const pokemon = Math.floor(Math.random() * 721) + 1; try { const { body } = await snekfetch - .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`); + .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}/`); const names = body.names.map(name => name.name.toLowerCase()); const displayName = filterPkmn(body.names).name; const id = `${'000'.slice(body.id.toString().length)}${body.id}`; diff --git a/commands/random/horoscope.js b/commands/random/horoscope.js index db29093a..ccd8a8c9 100644 --- a/commands/random/horoscope.js +++ b/commands/random/horoscope.js @@ -32,7 +32,7 @@ module.exports = class HoroscopeCommand extends Command { const { sign } = args; try { const { text } = await snekfetch - .get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today`); + .get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today/`); const body = JSON.parse(text); const embed = new MessageEmbed() .setColor(0x9797FF) diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index eb37af31..a48ca7c1 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -40,7 +40,8 @@ module.exports = class StrawpollCommand extends Command { if (options.length > 31) return msg.say('Please provide thirty or less choices.'); try { const { body } = await snekfetch - .post('https://strawpoll.me/api/v2/polls') + .post('https://strawpoll.me/api/v2/polls', { followRedirects: true }) + .set({ 'Content-Type': 'application/json' }) .send({ title, options }); return msg.say(stripIndents` ${body.title} diff --git a/commands/search/bulbapedia.js b/commands/search/bulbapedia.js index 710f8ddd..f51a7b9a 100644 --- a/commands/search/bulbapedia.js +++ b/commands/search/bulbapedia.js @@ -26,7 +26,7 @@ module.exports = class BulbapediaCommand extends Command { const { query } = args; try { const { body } = await snekfetch - .get('http://bulbapedia.bulbagarden.net/w/api.php') + .get('https://bulbapedia.bulbagarden.net/w/api.php') .query({ action: 'query', prop: 'extracts', diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index 96e44aa2..4d9228cd 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -28,7 +28,7 @@ module.exports = class PokedexCommand extends Command { const { pokemon } = args; try { const { body } = await snekfetch - .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`); + .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}/`); const id = `${'000'.slice(body.id.toString().length)}${body.id}`; const embed = new MessageEmbed() .setColor(0xED1C24)