nyx/commands/Fun/drake.js

25 lines
587 B
JavaScript
Raw Normal View History

2021-06-14 18:54:02 +02:00
const {
Client,
Message,
MessageEmbed,
MessageAttachment,
} = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "drake",
description: "Drake meme",
usage: "(Text) (Text)",
2021-06-24 09:53:19 +02:00
category: "Fun",
2021-06-14 18:54:02 +02:00
run: async (client, message, args) => {
const t1 = args[0];
const t2 = args.slice(1).join(" ");
const res = await fetch(
`https://frenchnoodles.xyz/api/endpoints/drake/?text1=${t1}&text2=${t2}`,
{}
);
let i = await res.buffer();
const drake = new MessageAttachment(i);
message.inlineReply(drake);
},
};