Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const fs = require('fs');
- const client = require('../index')
- const db = client.db
- module.exports = {
- name: "profile",
- cooldown: 10,
- async execute(msg, args, client) {
- var args = msg.content.split(' ').slice(1);
- let user = msg.mentions.users.first() || client.users.cache.get(args[0]) || msg.author;
- //embeds
- let embedcolor = await db.get(`embedcolor_${msg.guild.id}`);
- if(embedcolor == null) embedcolor = "#b256b6";
- let nouser = new Discord.MessageEmbed()
- .setDescription(`<:749753030899007620:749779549574922301> **Couldn't Find User**`)
- .setColor(embedcolor);
- let bots = new Discord.MessageEmbed()
- .setDescription(`<:749753030899007620:749779549574922301> **Bots Doesn't Have Profiles**`)
- .setColor(embedcolor);
- //END EMBEDS
- if(!user) return msg.channel.send(nouser)
- if(user.bot) return msg.channel.send(bots)
- let curbg = await db.fetch(`currentbg_${user.id}`)
- if(curbg == null) curbg = 'https://cdn.discordapp.com/attachments/741429412083269753/741429831324926009/8d542db2bf43fd638bfa96006248b7fd.jpg';
- let coins = await db.fetch(`coins_${user.id}`)
- if(coins == null) coins = '0'
- let likes = await db.fetch(`likes_${user.id}`)
- if(likes == null) likes = '0'
- let note = await db.fetch(`note_${user.id}`);
- if(note == null) note = ''
- let uBlacklist = await db.fetch(`Blacklist_${user.id}`);
- if(uBlacklist === 'on') coins = 'Blacklisted' , likes = 'Blacklisted' , note = 'Blacklisted'
- const devs = ["708079263387090974","700656817344086078","605509682294947864","710671121871011891","547843804657352704","391356330654564352","560597939563790347","742863518218321994","633775422554767370"];
- const vip = ["723911619251404801","","",""];
- const liver = await db.fetch(`liver_${user.id}`);
- const real = await db.fetch(`real_${user.id}`);
- const bvb = await db.fetch(`bvb_${user.id}`);
- const barca = await db.fetch(`barca_${user.id}`);
- let cur = await db.fetch(`curbadge_${user.id}`)
- const Canvas = require('canvas')
- const { loadImage } = require('canvas')
- const canvas = Canvas.createCanvas(400, 400);
- const ctx = canvas.getContext('2d');
- canvas.width = 400;
- const x = canvas.width / 2;
- const back = await loadImage(curbg)
- ctx.drawImage(back, 0, 0, 400, 400);
- const template = await loadImage('https://cdn.discordapp.com/attachments/749777003510759505/750223492716298260/sfdsdsdsd.png')
- ctx.drawImage(template, 0, 0, 400, 400);
- ctx.font = "bold 30px kathen"; //Name ,_,
- ctx.fontSize = "40px";
- ctx.fillStyle = "#000000";
- ctx.textAlign = "center";
- ctx.fillText(`${user.username} `, x, 202);
- ctx.font = "bold 30px kathen"; //Name ,_,
- ctx.fontSize = "40px";
- ctx.fillStyle = "#f1f1f1";
- ctx.textAlign = "center";
- ctx.fillText(`${user.username} `, x, 200);
- ctx.font = "bold 22px kathen"; //Name ,_,
- ctx.fontSize = "22px";
- ctx.fillStyle = "#000000";
- ctx.textAlign = "center";
- ctx.fillText(`${note} `, x, 322.9);
- ctx.font = "bold 22px kathen"; //Name ,_,
- ctx.fontSize = "22px";
- ctx.fillStyle = "#f1f1f1";
- ctx.textAlign = "center";
- ctx.fillText(`${note} `, x, 320.9);
- ctx.font = "bold 20px kathen"; //Name ,_,
- ctx.fontSize = "20px";
- ctx.fillStyle = "#000000";
- ctx.fillText(`${coins} `, 92.6, 138.3);
- ctx.font = "bold 20px kathen"; //Name ,_,
- ctx.fontSize = "20px";
- ctx.fillStyle = "#f1f1f1";
- ctx.fillText(`${coins} `, 92.6, 136.3);
- ctx.font = "bold 20px kathen"; //Name ,_,
- ctx.fontSize = "20px";
- ctx.fillStyle = "#000000";
- ctx.fillText(`${likes} `, 314.6, 138.3);
- ctx.font = "bold 20px kathen"; //Name ,_,
- ctx.fontSize = "20px";
- ctx.fillStyle = "#f1f1f1";
- ctx.fillText(`${likes} `, 314.6, 136.3);
- if (devs.includes(user.id)) {
- const devs = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740429389832912896/741427091337248888/e63co024yh741.png');
- ctx.drawImage(devs, 179, 226, 42, 42);
- }
- if (vip.includes(user.id)) {
- const vip2 = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740429389832912896/741426265722191872/hypesquad.png');
- ctx.drawImage(vip2, 179, 226, 42, 42);
- }
- if(cur == 'https://cdn.discordapp.com/attachments/740556620358221906/741203011287646218/real-madrid.png') {
- if(devs.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203011287646218/real-madrid.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- if(vip.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203011287646218/real-madrid.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203011287646218/real-madrid.png');
- ctx.drawImage(real, 173, 226, 50, 50);
- }
- }
- }
- //Liver
- if(cur == 'https://cdn.discordapp.com/attachments/740556620358221906/741203010046132224/liverpool.png') {
- if(devs.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203010046132224/liverpool.png');
- ctx.drawImage(real, 256, 226, 50, 50);
- } else {
- if(vip.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203010046132224/liverpool.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203010046132224/liverpool.png');
- ctx.drawImage(real, 173, 226, 50, 50);
- }
- }
- }
- //BARCA
- if(cur == 'https://cdn.discordapp.com/attachments/740556620358221906/741203007877939210/022-barcelona.png') {
- if(devs.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203007877939210/022-barcelona.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- if(vip.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203007877939210/022-barcelona.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203007877939210/022-barcelona.png');
- ctx.drawImage(real, 173, 226, 50, 50);
- }
- }
- }
- //BVB
- if(cur == 'https://cdn.discordapp.com/attachments/740556620358221906/741203008796360714/025-borusia-dortmund.png') {
- if(devs.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203008796360714/025-borusia-dortmund.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- if(vip.includes(user.id)) {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203008796360714/025-borusia-dortmund.png');
- ctx.drawImage(real, 248, 226, 50, 50);
- } else {
- const real = await Canvas.loadImage('https://cdn.discordapp.com/attachments/740556620358221906/741203008796360714/025-borusia-dortmund.png');
- ctx.drawImage(real, 173, 226, 50, 50);
- }
- }
- }
- ctx.beginPath();
- ctx.arc(199.5, 115.2, 52, -45.9, Math.PI * 2, true);
- ctx.closePath();
- ctx.clip();
- const avatar = await Canvas.loadImage(user.displayAvatarURL({ format: 'jpg' }));
- ctx.drawImage(avatar, 147.7, 63.4, 104, 104);
- const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'profile.png');
- msg.channel.startTyping()
- msg.channel.send(attachment);
- msg.channel.stopTyping()
- //https://i.redd.it/e63co024yh741.png
- //END LOL
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement