nyx/command/Fun/drake.js

31 lines
752 B
JavaScript

const { MessageAttachment } = require("discord.js");
const axios = require("axios");
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(
`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] });
},
};