2021-09-06 12:38:25 +02:00
|
|
|
const { MessageAttachment } = require("discord.js");
|
2021-09-17 18:28:39 +02:00
|
|
|
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) => {
|
2021-09-17 18:28:39 +02:00
|
|
|
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] });
|
|
|
|
},
|
|
|
|
};
|