New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

welcomer-gif

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

welcomer-gif

Welcome animated gif using canvas

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
179
increased by4.68%
Maintainers
1
Weekly downloads
 
Created
Source

Welcomer-gif

NPM

Installation

yarn add welcomer-gif

Preview

img

Class Welcomer:

The use of the class Welcomer(module).

Parameters:
ParametersTypeDescription
optionsObjectwelcome options
setNamestringSet name of the user.
setAvatarstringSet avatar of the user string or Buffer.
setDiscriminatornumberSet discriminator/tag of user.
setBackgroundstringSet background of the gif.
setGIFbooleanSet if the background you want to use is a gif or not.
setBlurnumberSet the blur value if don't then don't use it.

Example:

const axios = require('axios')
const Welcomer = require('welcomer-gif')
const { writeFile } = require('fs-extra')

const getBuffer = async (url) =>
  (
    await axios.get(url, {
      responseType: 'arraybuffer',
    })
  ).data

const welcomer = async () => {
  const avatar = await getBuffer('https://telegra.ph/file/59952c903fdfb10b752b3.jpg')
  const image = await new Welcomer()
    .setBackground('https://i.pinimg.com/originals/07/28/dc/0728dc400eca09632215055ff003d8bf.gif')
    .setGIF(true)
    .setAvatar(avatar)
    .setName('AlιAryαɴTech')
    .setDiscriminator(1100)
    .setBlur(2)
  const buffer = await image.generate()

  writeFile('buffer.gif', buffer, (err) => {
    if (err) throw err
  })
  console.log('successful')
}
welcomer()

Thanks To

Keywords

FAQs

Package last updated on 02 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc