mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Move to snekfetch 🐍
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user