Giter VIP home page Giter VIP logo

pya.js's Introduction

pya.js

npm install pya.js

After that, you only need to create options for the file, use the template below, to make it easier for you

const { AttachmentBuilder } = require("discord.js")
const Image = require("pya.js")

const canvas = await Image({
  name: "PyaPyaPya",
  text: "pya is very cute",
  backgroundURL: "https://my-background.png", // can only image url
  avatarURL: "https://my-avatar.png", // can only image url
  shadow: {
    enabled: true, // whatever, but my recommendation is true
    blur: 10, // for better results, I recommend 10-15
    color: "random" // I can only use hex and "random"
  },
  border: {
    enabled: true, // whatever, but my recommendation is true
    color: "random" // hex or "random"
  },
  cover: {
    enabled: true, // If shadows are enabled, I also recommend this to be enabled
    opacity: 0.5, // You can set it from 0.1 to 1
    color: "random" // hex or "random"
  },
  color: {
    name: "#FF658B", // hex or "random"
    text: "#FFFFFF" // hex or "random"
  }
})

const attachment = new AttachmentBuilder(await canvas.encode("png"), {
  name: "pya-image.png"
})

message.channel.send({files: [attachment]})

finish

congratulations (。♡‿♡。)

This is me give me suggestions for the future, by sending me a message on discord

pya.js's People

Contributors

nlyla avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.