Move to snekfetch 🐍

This commit is contained in:
Daniel Odendahl Jr
2017-04-16 01:12:22 +00:00
parent 90d3e66e89
commit 8074fe51bd
36 changed files with 252 additions and 311 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const { Command } = require('discord.js-commando');
const request = require('superagent');
const snekfetch = require('snekfetch');
module.exports = class StrawpollCommand extends Command {
constructor(client) {
@@ -41,7 +41,7 @@ module.exports = class StrawpollCommand extends Command {
if (choices.length < 2) return message.say(':x: Error! You provided less than two choices!');
if (choices.length > 31) return message.say(':x: Error! You provided more than thirty choices!');
try {
const response = await request
const response = await snekfetch
.post('https://strawpoll.me/api/v2/polls')
.send({
title: title,