npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multi-djs

v0.0.16

Published

A npm of image manipulation, gif catcher and functions

Downloads

22

Readme

Multi-djs npm npm

Installation

NPM

Canvas

| Function | Params | | -------- | ------ | | triggered() | image | | affect() | image | | batslap() | image image2 | | beautiful() | image | | blur() | image level (optional) | | bnw() | image | | bolsonaro() | image | | brightness() | image amount | | circle() | image | | color() | color (optional) | | colorfy() | image color | | comunism() | image | | createQrCode() | text options = { background: 'hexColor', color: 'hexColor' } (optional) | | darkness() | image amount | | del() | image | | dither() | image | | facepalm() | image | | fuse() | image image2 | | gay() | image | | invert() | image | | jail() | image | | kiss() | image image2 | | magik() | image | | pixelate() | image | | replaceColor() | image r g b | | rip() | image | | rotate() | image angle (optional) | | sepia() | image | | stickbug() | image | | spank() | image image2 | | trash() | image | | threshold() | image amount (optional) | | wanted() | image | | wasted() | image |

Gif

| Functions | | -------- | | cuddle() feed() hug() kiss() pat() poke() slap() tickle() |

Misc

| Function | Params | Description | | -------- | ------ | ----------- | | choose() | choices | Faz uma decisão por você. | | pagination() | type message pages emojiList timeout | Cria embeds com páginas. | | formatSizeUnits() | bytes | Formata bytes para Yottabytes, Zettabytes, Exabytes, Petabytes, Terabytes, Gigabytes, Megabytes, Kilobytes, e Bytes. | | getRandomInt() | min max | Escolhe um número de acordo com o número mínimo e o máximo. | | randomCharacters() | length | Cria um texto com caracteres aleatórios. | | randomHex() | none | Retorna um código hexadecimal aleatório. | | removeAcents() | text | Remove acentos de um texto. | | shorten() | text length | Reduz o comprimento de um texto. | | uptime() | message | Mostra o uptime da sua aplicação. |

Canvas Examples

Triggered Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!triggered") {
    let image = await multi.canvas.triggered(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "triggered.gif");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Affect Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!affect") {
    let image = await multi.canvas.affect(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "affect.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Batslap Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!batslap") {
    
    let member = message.mentions.users.first()

    if(!member) return message.channel.send("Mencione alguém")

    let image = message.author.displayAvatarURL({ dynamic: false, format: 'png' })

    let image2 = member.displayAvatarURL({ dynamic: false, format: 'png' })

    let attach = await multi.canvas.batslap(image, image2);

    let attachment = new Discord.MessageAttachment(attach, "batslap.png");

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


client.login("Your_Bot_Token_here");

image

Beautiful Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!beautiful") {
    let image = await multi.canvas.beautiful(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "beautiful.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Blur Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!blur") {
    let image = await multi.canvas.blur(message.author.displayAvatarURL({ dynamic: false, format: 'png' }), 2);

    let attachment = new Discord.MessageAttachment(image, "blur.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Bnw Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!bnw") {
    let image = await multi.canvas.bnw(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "bnw.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Bolsonaro Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!bolsonaro") {
    let image = await multi.canvas.bolsonaro(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "bolsonaro.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Brightness Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!brightness") {
    let amount = 100
    let image = await multi.canvas.brightness(message.author.displayAvatarURL({ dynamic: false, format: 'png' }), amount);

    let attachment = new Discord.MessageAttachment(image, "brightness.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Circle Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!circle") {
    let image = await multi.canvas.circle(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "circle.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Color Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!color") {
    let color = "#8572da";

    let image = await multi.canvas.color(color);

    let attachment = new Discord.MessageAttachment(image, "color.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Colorfy Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!colorfy") {
    let image = message.author.displayAvatarURL({ dynamic: false, format: 'png' })
    
    let color = "#8572da";

    let image = await multi.canvas.colorfy(image, color);

    let attachment = new Discord.MessageAttachment(image, "colorfy.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Comunism Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!comunism") {
    let image = await multi.canvas.comunism(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "comunism.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

createQrCode Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!createqrcode") {
    let text = 'www.youtube.com/watch?v=dQw4w9WgXcQ'
    
    let image = await multi.canvas.createQrCode(text);

    let attachment = new Discord.MessageAttachment(image, "createqrcode.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Darkness Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!darkness") {
    let amount = 100
    let image = await multi.canvas.darkness(message.author.displayAvatarURL({ dynamic: false, format: 'png' }), amount);

    let attachment = new Discord.MessageAttachment(image, "darkness.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Del Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!del") {
    let image = await multi.canvas.del(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "del.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Dither Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!dither") {
    let image = await multi.canvas.dither(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "dither.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Facepalm Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!facepalm") {
    let image = await multi.canvas.facepalm(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "facepalm.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Fuse Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!fuse") {
    
    let member = message.mentions.users.first()

    if(!member) return message.channel.send("Mencione alguém")

    let image = message.author.displayAvatarURL({ dynamic: false, format: 'png' })

    let image2 = member.displayAvatarURL({ dynamic: false, format: 'png' })

    let attach = await multi.canvas.fuse(image, image2);

    let attachment = new Discord.MessageAttachment(attach, "fuse.png");

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

client.login("Your_Bot_Token_here");

image

Gay Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!gay") {
    let image = await multi.canvas.gay(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "gay.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Invert Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!invert") {
    let image = await multi.canvas.invert(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "invert.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Jail Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!jail") {
    let image = await multi.canvas.jail(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "jail.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Kiss Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!kiss") {
    
    let member = message.mentions.users.first()

    if(!member) return message.channel.send("Mencione alguém")

    let image = message.author.displayAvatarURL({ dynamic: false, format: 'png' })

    let image2 = member.displayAvatarURL({ dynamic: false, format: 'png' })

    let attach = await multi.canvas.kiss(image, image2);

    let attachment = new Discord.MessageAttachment(attach, "kiss.png");

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

client.login("Your_Bot_Token_here");

image

Magik Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!magik") {
    let image = await multi.canvas.magik(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "magik.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Pixelate Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!pixelate") {
    let image = await multi.canvas.pixelate(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "pixelate.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

ReplaceColor Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!replaceColor") {
    let r = "1";
    let g = "100";
    let b = "200";

    let image = await multi.canvas.replaceColor(message.author.displayAvatarURL({ dynamic: false, format: 'png' }), r, g,b);

    let attachment = new Discord.MessageAttachment(image, "replaceColor.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Rip Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!rip") {
    let image = await multi.canvas.rip(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "rip.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Rotate Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!rotate") {
    let angle = 10

    let image = await multi.canvas.rotate(message.author.displayAvatarURL({ dynamic: false, format: 'png' }), angle);

    let attachment = new Discord.MessageAttachment(image, "rotate.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Sepia Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!sepia") {
    let image = await multi.canvas.sepia(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "sepia.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Stickbug Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!stickbug") {
    let image = await multi.canvas.stickbug(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "stickbug.mp4");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Spank Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!spank") {
    
    let member = message.mentions.users.first()

    if(!member) return message.channel.send("Mencione alguém")

    let image = message.author.displayAvatarURL({ dynamic: false, format: 'png' })

    let image2 = member.displayAvatarURL({ dynamic: false, format: 'png' })

    let attach = await multi.canvas.spank(image, image2);

    let attachment = new Discord.MessageAttachment(attach, "spank.png");

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

client.login("Your_Bot_Token_here");

image

Trash Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!trash") {
    let image = await multi.canvas.trash(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "trash.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Threshold Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!threshold") {
    let image = await multi.canvas.threshold(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "threshold.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Wanted Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!wanted") {
    let image = await multi.canvas.wanted(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "wanted.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Wasted Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!wasted") {
    let image = await multi.canvas.wasted(message.author.displayAvatarURL({ dynamic: false, format: 'png' }));

    let attachment = new Discord.MessageAttachment(image, "wasted.png");

    return message.channel.send({files: [attachment]});
}
})
 
client.login("Your_Bot_Token_here");

image

Gif Examples

Cuddle Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!cuddle") {
    let image = await multi.gif.cuddle();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Feed Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!feed") {
    let image = await multi.gif.feed();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Hug Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!hug") {
    let image = await multi.gif.hug();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Kiss Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!kiss") {
    let image = await multi.gif.kiss();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Pat Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!pat") {
    let image = await multi.gif.pat();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Poke Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!poke") {
    let image = await multi.gif.poke();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Slap Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!slap") {
    let image = await multi.gif.slap();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Tickle Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!tickle") {
    let image = await multi.gif.tickle();

    return message.channel.send({files: [image});
}
})
 
client.login("Your_Bot_Token_here");

image

Misc Examples

Choose Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!choose") {
    
    let choices = 'multi, Loritta'

    let choose = multi.choose(choices)

    console.log(choose)
}
})

image

Pagination Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!pagination") {
    const embed = new Discord.MessageEmbed()
    .setTitle('Title')
    .setDescription('Description')

    const embed2 = new Discord.MessageEmbed()
    .setTitle('Title 2')
    .setDescription('Description 2')

    const embed3 = new Discord.MessageEmbed()
    .setTitle('Title 3')
    .setDescription('Description 3')
        
    const type = 'guild' // 'dm'

    const pages = [ embed, embed2, embed3 ]

    const emojiList = ["⏪", "⏩"];

    const timeout = '120000';

    multi.pagination(type, message, pages, emojiList, timeout)
}
})
 
client.login("Your_Bot_Token_here");

image

FormatSizeUnits Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!format") {
    let format = multi.formatSizeUnits(1000000000) // 1 GB

    console.log(format)
}
})
 
client.login("Your_Bot_Token_here");

image

getRandomInt Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!getRandomInt") {

    let min = 1
    let max = 10 
    let result = multi.getRandomInt(min, max)

    console.log(result)
}
})
 
client.login("Your_Bot_Token_here");

image

RemoveAcents Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!removeacents") {
    let text = "ã ê î ò û ń ž ş đ ģ ķ ł ý ț ř ç";

    let removedAcents = multi.removeAcents(text)

    console.log(removedAcents)
}
})
 
client.login("Your_Bot_Token_here");

image

Shorten Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!shorten") {

    let text = 'A npm multi é a melhor npm de manipulção de imagem de todas!';
    let length = '25';

    let removedAcents = multi.shorten(text, length)

    console.log(removedAcents)
}
})
 
client.login("Your_Bot_Token_here");

image

RandomCharacters Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!randomCharacters") {
    let length = 5;

    let random = multi.randomCharacters(length)

    console.log(random)
}
})
 
client.login("Your_Bot_Token_here");

image

RandomHex Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!randomHex") {

    let randomHex = multi.randomHex()

    console.log(randomHex)
}
})
 
client.login("Your_Bot_Token_here");

image

Uptime Example

const Discord = require("discord.js");
const client = new Discord.Client({ intents: 32767})
const multi = require("multi-djs");

client.on("message", async (message) => {
  if (message.content === "!uptime") {

    let uptime = multi.uptime(message)

    console.log(uptime)
}
})
 
client.login("Your_Bot_Token_here");

image