mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 15:57:54 +02:00
snekfetch why
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user