Skip to content

AliAryanTech/Welcomer-gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcomer-gif

NPM

Installation

yarn add welcomer-gif

Preview

img

Class Welcomer:

The use of the class Welcomer(module).

Parameters:

Parameters Type Description
options Object welcome options
setName string Set name of the user.
setAvatar string Set avatar of the user string or Buffer.
setDiscriminator number Set discriminator/tag of user.
setBackground string Set background of the gif.
setGIF boolean Set if the background you want to use is a gif or not.
setBlur number Set 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

Releases

No releases published

Packages

No packages published