Skip to content

Commit

Permalink
add command
Browse files Browse the repository at this point in the history
  • Loading branch information
Flicksie committed Aug 19, 2023
1 parent 906197d commit 18335af
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions core/commands/fun/lookthat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const Picto = require("../../utilities/Picto");

const init = async (msg) => {
let link = (msg.args.join(" ").match(/(http[^ |^>]+)/gm) || [""])[0];

try {
// link ??= msg.mentions[0]?.displayAvatarURL ?? await PLX.getChannelImg(msg) ?? msg.author.displayAvatarURL;
if (!link) link = msg.mentions[0]?.displayAvatarURL ?? await PLX.getChannelImg(msg) ?? msg.author.displayAvatarURL;
} catch (e) {
// link ??= (msg.mentions[0] || msg.author).displayAvatarURL;
if (!link) link = (msg.mentions[0] || msg.author).displayAvatarURL;
}

const [subject, hand] = await Promise.all([
Picto.getCanvas(link),
Picto.getCanvas(`${paths.CDN}/build/assorted/aquelamerda.png`),
]);
const canvas = Picto.new(subject.width, subject.height);
const ctx = canvas.getContext("2d");

ctx.drawImage(subject, 0, 0);
ctx.drawImage(hand, 0, 0, subject.height, subject.height);

//return msg.channel.send($t("responses.forFun.thatShit", { lngs: msg.lang } ), file(await canvas.toBuffer(), "latts.png"));
return msg.channel.send( "Olha só **aquela** merda!", file(await canvas.toBuffer(), "latts.png"));
};

module.exports = {
init,
pub: false,
cmd: "thatshit",
perms: 3,
cat: "fun",
botPerms: ["attachFiles", "embedLinks"],
aliases: ["aquelamerda", "ltts", "look at that shit"],
};

0 comments on commit 18335af

Please sign in to comment.