Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. const Discord = require("discord.js")
  2. const Canvas = require("canvas")
  3. const snekfetch = require("snekfetch")
  4.  
  5. module.exports.run = async (bot, message, args) => {
  6. const canvas = Canvas.createCanvas(690, 245)
  7. const ctx = canvas.getContext('2d')
  8. const background = await Canvas.loadImage('../Images/background.jpg')
  9. ctx.drawImage(background, 0, 0, canvas.width, canvas.height)
  10. const attachment = new Discord.Attachment(canvas.toBuffer(), 'profile.png')
  11.  
  12. message.channel.send("Testing message", attachment)
  13. }
  14.  
  15. module.exports.help = {
  16. name: "profile"
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement