nyx/command/Fun/drake.js

32 lines
752 B
JavaScript
Raw Normal View History

2021-09-06 12:38:25 +02:00
const { MessageAttachment } = require("discord.js");
const axios = require("axios");
2021-09-06 12:38:25 +02:00
module.exports = {
name: "drake",
description: "Drake meme",
usage: "(Text) (Text)",
category: "Fun",
options: [
{
type: 3,
name: "first",
description: "The first text",
required: true,
},
{
type: 3,
name: "second",
description: "The second text",
required: true,
},
],
run: async (client, interaction, args) => {
const res = await axios.get(
2021-09-06 12:38:25 +02:00
`https://frenchnoodles.xyz/api/endpoints/drake/?text1=${args[0]}&text2=${args[1]}`,
{}
);
let i = await res.buffer();
const drake = new MessageAttachment(i);
await interaction.followUp({ files: [drake] });
},
};