nyx/commands/Fun/drake.js
2021-06-24 15:53:19 +08:00

24 lines
587 B
JavaScript

const {
Client,
Message,
MessageEmbed,
MessageAttachment,
} = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "drake",
description: "Drake meme",
usage: "(Text) (Text)",
category: "Fun",
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);
},
};