Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const Client = new Discord.Client();
- Client.login ('NTY5OTE4ODEwMjAzNjE5MzU3.XopQlQ.ya8juZN8-MxbT_onXJa22uHs-hM');
- var key = "o3ZCZ8oTbDggWIy";
- var stev = '516307527806484490';
- Client.on ('ready', async () => {
- console.log ("hi");
- Client.user.setActivity ('hi', {type: 'WATCHING'})
- console.log (Client.user.presence.status)
- });
- var Canvas = require ('canvas');
- Client.on ('message', async (Message) => {
- if (!Message.guild) return null;
- if (Message.content.split (' ') [0].toLowerCase() == "$profile") {
- var user = Message.mentions.users.first() || Message.author;
- const canvas = Canvas.createCanvas(600, 426);
- const ctx = canvas.getContext('2d');
- const background = await Canvas.loadImage('https://cdn.glitch.com/c0c10cad-cebf-44d8-96ba-f5d25bb6e7fd%2Fakon_profile.png?v=1586123895011');
- ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
- const statuss = ['https://media.discordapp.net/attachments/552603311770173470/696495423069618196/9852_Online_Status.png',
- 'https://media.discordapp.net/attachments/552603311770173470/696495561418735686/9487_Offline_Status.png',
- 'https://media.discordapp.net/attachments/552603311770173470/696495539054968902/9693_Idle_Status.png',
- 'https://media.discordapp.net/attachments/552603311770173470/696495508591738980/6290_DND_Status.png'];
- const statusn = ['online', 'offline', 'idle', 'dnd'];
- var statusImage = await Canvas.loadImage (statuss [statusn.indexOf (user.presence.status.toLowerCase())]);
- ctx.drawImage(statusImage, 95, 88, 25, 25);
- //instagram
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#ffffff';
- ctx.fillText ('Instagram', 75, 320);
- //Snapchat
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#ffffff';
- ctx.fillText ('Snapchat', 360, 320);
- //twitter
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#ffffff';
- ctx.fillText ('Twitter', 75, 390);
- //facebook
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#ffffff';
- ctx.fillText ('Facebook', 360, 390);
- //Username#Tag
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#ffffff';
- ctx.fillText (user.tag, 130, 50);
- //Note
- ctx.font = '18px sans-serif';
- ctx.fillStyle = '#837E7E';
- ctx.fillText ('note', 30, 240);
- //Playing
- let gameType = {
- 0: 'PLAYING:',
- 1: 'STREAMING:',
- 2: 'LISTENING:',
- 3: 'WATCHING:'
- };
- //ctx.font = '18px sans-serif';
- //ctx.fillStyle = '#ffffff';
- //ctx.fillText (gameType [Client.users.cache.get (user.id).presence.status], 130, 70);
- //1min dont edit
- ctx.beginPath();
- ctx.arc(70, 65, 50, 0, (2 * Math.PI));
- // ctx.stroke ();
- ctx.clip ();
- const avatar = await Canvas.loadImage(user.displayAvatarURL({ format: 'png' }));
- //avatar
- ctx.drawImage(avatar, 20, 15, 100, 100);
- ctx.drawImage(statusImage, 95, 88, 25, 25);
- Message.channel.send (new Discord.MessageAttachment (canvas.toBuffer ()))
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement