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

infamous-npm

v20.5.0

Published

Un package con varias funciones para usar

Downloads

77

Readme


Instalacion:

npm install infamous-npm

Actualizar el npm a la ultima version:

npm install infamous-npm@latest

Avisos importantes!

Si tienes una version que este por debajo de la 10.0.2 se te pide que actualizes el npm 
a la version mas reciente porque entre la version 8 y la 9 hubo 
un error muy fatal (ninguna funcion servia).
Pero ya esta arreglado!
Solo actualizen el npm

Como hacer que infamous-npm mande mensajes por ti (beta):

let { Infamous } = require("infamous-npm")
client.on("message", async (message) => {
if (message.author.bot) return;
let infamous = new Infamous({
    Message: message
})
})

Info:

Aqui

Requisitos:

discord.js

Funciones:

calculate

calculateArea

conversor

detectURL

setAfk (beta)

getAfk (beta)

deleteAfk (beta)

ppt

progressbar

slotmachine

npmsearch

binary

tweet

type

lyrics

ytcomment

hex

rgb

shortnumber

Calculate:


Uso:

Inicias una operacion, calculate(primer dijito, tipo, segundo dijito)
• opciones para el primer dijito: puedes usar palabras clave
• opciones para el tipo: suma, resta, division, multiplicacion, raiz-cuadrada
• opciones para el segundo dijito: puedes usar palabras clave
• palabras clave: pi (π), numero aleatorio

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |primer dijito| Number| El primer dijito a calcular| |tipo| String| El tipo de operacion| |segundo dijito| Number| El segundo dijito a calcular|

Ejemplo:

let { calculate } = require("infamous-npm")
calculate("25", "raiz-cuadrada").then(resultado => console.log(resultado))
//retorna "Resultado: 5"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { calculate } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "sumar"){
let operacion = await calculate(args[0], "suma", args[1])
message.channel.send(operacion)
}
})

CalculateArea:


Uso:

Calculas el area de alguna figura (cuadrado, rectangulo, circulo o triangulo), calculateArea(figura, ancho, largo)
• opciones para la figura: cuadrado, rectangulo, circulo o triangulo
• opciones para el ancho: sin opciones
• opciones para el largo: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |figura| String| El tipo de figura| |ancho| Number| El ancho de la figura, si la figura es circulo el ancho debe ser la medida del radio, si la figura es triangulo el ancho debe ser la medida de la base| |largo| Number| El largo de la figura, si la figura es circulo el largo debe ser el valor de pi (π), si la figura es triangulo el largo debe ser la medida de la altura|

Ejemplo:

let { calculateArea } = require("infamous-npm")
calculateArea("circulo", "10", "3.1415").then(resultado => console.log(resultado))
//retorna "Resultado: 62.830000000000005"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { calculateArea } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "sumar"){
let operacion = await calculateArea("circulo", args[0], args[1])
message.channel.send(operacion)
}
})

Conversor:


Uso:

Conviertes algo (segundos, dias, etc) a otra cosa (minutos, semanas), conversor(tipo1, tipo2, valor)
• opciones para el tipo1: año, mes, semana, dia, hora, minuto, segundo
• opciones para el tipo2: año, mes, semana, dia, hora, minuto, segundo
• opciones para el valor: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |tipo1| String| El primer tipo del valor| |tipo2| String| El segundo tipo a convertir el tipo1| |valor| Number| El valor del tipo1|

Ejemplo:

let { conversor } = require("infamous-npm")
conversor("semana", "dia", "3").then(resultado => console.log(resultado))
//retorna "3 semana/s son 21 dia/s"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { conversor } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "convertir"){
let convertir = await conversor(args[0], args[1], args[2])
message.channel.send(convertir)
}
})
//Con la funcion de Infamous
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { Infamous } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "npmsearch"){
let infamous = new Infamous({
    Message: message
})
infamous.conversor(args[0],args[1],args[2])
}
})

DetectURL:


Uso:

Ves si una url es valida o no, detectURL(url)
• opciones para la url: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |url| String| La url a ver si es valida|

Ejemplo:

let { detectURL } = require("infamous-npm")
detectURL("https://example.com").then(res => console.log(res))
//retorna false
detectURL("https://www.npmjs.com/package/infamous-npm").then(res => console.log(res))
//retorna true
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { detectURL } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
let url = await detectURL(message.content)
if(url === true){
    message.delete()
    message.channel.send(`No se permiten enlaces`)
}
})

SetAfk:


Uso:

Estableces afk a un string, setAfk({
    Usuario: user,
    Razon: razon
})
• opciones para el user: sin opciones
• opciones para la razon: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |user| String| Aqui pondras a que se le pondra afk, puedes poner un id o un nombre o parecido (es mas recomendable un id)| |razon| String| Aqui pondras la razon del afk (max 10k caracteres)|

Ejemplo:

let { setAfk } = require("infamous-npm")
setAfk({
    Usuario: "Jorge.S",
    Razon: "Creando un npm"
}).then(res => console.log(res))
//retorna "{ usuario: 'Jorge.S', razon: 'Creando un npm' }"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { setAfk } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "afk"){
let setafk = await setAfk({
    Usuario: message.author.id,
    Razon: args.join(" ")
})
let embed = new MessageEmbed()
.setColor("GREEN")
.setTitle("Afk!")
.setTimestamp()
.setDescription(`**Te has puesto afk (${setafk.usuario})\nRazon: \`${setafk.razon}\`**`)
message.channel.send(embed)
}
})
//Esta funcion no avisara a quien mencione a la persona que se puso afk, si no saben como hacer esto pueden unirse al servidor

GetAfk:


Uso:

Obtienes el afk de un string, getAfk({
    Usuario: user
})
• opciones para el user: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |user| String| Aqui pondras a que se le obtendra si esta afk, puedes poner un id o un nombre o parecido (es mas recomendable un id)|

Ejemplo:

let { getAfk } = require("infamous-npm")
getAfk({
    Usuario: "Jorge.S"
}).then(res => console.log(res))
//retorna "{ usuario: 'Jorge.S', razon: 'Creando un npm', tiempo: 'hace unos segundos' }"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { getAfk } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "afk"){
let getafk = await getAfk({
    Usuario: message.author.id
})
if(getafk) return;
//esto hace que si el usuario ya esta afk retorne
let setafk = await setAfk({
    Usuario: message.author.id,
    Razon: args.join(" ")
})
let embed = new MessageEmbed()
.setColor("GREEN")
.setTitle("Afk!")
.setTimestamp()
.setDescription(`**Te has puesto afk (${setafk.usuario})\nRazon: \`${setafk.razon}\`**`)
message.channel.send(embed)
}
})
//Esta funcion no avisara a quien mencione a la persona que se puso afk, si no saben como hacer esto pueden unirse al servidor

DeleteAfk:


Uso:

Borras el afk de un string, getAfk({
    Usuario: user
})
• opciones para el user: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |user| String| Aqui pondras a que se le borrara su afk, puedes poner un id o un nombre o parecido (es mas recomendable un id)|

Ejemplo:

let { deleteAfk } = require("infamous-npm")
deleteAfk({
    Usuario: "Jorge.S"
}).then(res => console.log(res))
//retorna "Afk del usuario Jorge.S eliminado"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { deleteAfk } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "afk"){
let getafk = await getAfk({
    Usuario: message.author.id
})
if(getafk) {
    let deleteafk = await deleteAfk({
        Usuario: message.author.id
    })
    message.channel.send(deleteafk)
    return;
};
//esto hace que si el usuario ya esta afk se lo quite
let setafk = await setAfk({
    Usuario: message.author.id,
    Razon: args.join(" ")
})
let embed = new MessageEmbed()
.setColor("GREEN")
.setTitle("Afk!")
.setTimestamp()
.setDescription(`**Te has puesto afk (${setafk.usuario})\nRazon: \`${setafk.razon}\`**`)
message.channel.send(embed)
}
})
//Esta funcion no avisara a quien mencione a la persona que se puso afk, si no saben como hacer esto pueden unirse al servidor

Ppt:


Uso:

Juegas piedra, papel o tijera con tu bot, ppt(opcion)
• opciones para la opcion: piedra, papel o tijera

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |opcion| String| La opcion que escoges|

Ejemplo:

let { ppt } = require("infamous-npm")
ppt("piedra").then(res => console.log(res))
//retorna alguna respuesta segun la opcion bot
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { ppt } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "ppt"){
    let juego = await ppt(args[0])
    message.channel.send(juego)
}

Progressbar:


Uso:

Creas una progressbar, progressbar({
    total: total,
    actual: actual
})
• opciones para el total: sin opciones
• opciones para el actual: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ------| -------------------------------------------| |total| Number| Pones el total del que sera la progressbar| |actual| Number| Pones lo actual de la progressbar|

Ejemplo:

let { progressbar } = require("infamous-npm")
progressbar({
    total: 50,
    actual: 25
}).then(resultado => console.log(resultado))
//retorna "[█████.....]"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { progressbar } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "progressbar"){
let operacion = await progressbar({
    total: args[0],
    actual: args[1]
})
message.channel.send(operacion)
}
})

Slotmachine:


Uso:

Juegas con el traga monedas, slotmachine(apostado)
• opciones para el apostado: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |apostado| Number| Lo que apostaras|

Ejemplo:

let { slotmachine } = require("infamous-npm")
slotmachine("30").then(resultado => console.log(resultado))
//retorna 
{
  mensaje: 'Perdiste 30$',
  juego: ':gem: :coin: :coin: :x:\n' +
    ':gem: :gem: :coin: :arrow_left:\n' +
    ':coin: :dollar: :coin: :x:',
  apostado: 30,
  ganado_perdido: 30
}
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { slotmachine } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "apostar"){
let juego = await slotmachine(args[0])
let embed = new MessageEmbed()
.setTitle(juego.mensaje)
.setDescription(juego.juego)
message.channel.send(embed)
}
})

Npmsearch:


Uso:

Buscas un npm, npmsearch(nombre)
• nombre

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |nombre| String| El nombre del npm a buscar|

Ejemplo:

let { npmsearch } = require("infamous-npm")
npmsearch("jdkjdbskcbksnfkdbekdndkenejendj").then(resultado => console.log(resultado))
//retorna "No se encontraron resultados para el npm: jdkjdbskcbksnfkdbekdndkenejendj"
npmsearch("infamous-npm").then(resultado => console.log(resultado))
//retorna 
{
  nombre: 'infamous-npm',
  autor: { name: 'Jorge.S | 𝓙𝓸𝓻𝓰𝓮.𝓢#0809 | [email protected]'       },
  version: '10.0.4',
  descripcion: 'Un package con varias funciones para usar',
  licencia: 'ISC',
  archivo_principal: 'src/message.js',
  requisitos: 'discord.js',
  npmversion: '7.5.3',
  nodeversion: '15.10.0',
  creado: '09/06/2021 11:27:43',
  modificado: '17/06/2021 10:16:52',
  palabras_clave: [ 'infamous', 'npm' ],
  archivo_readme: 'README.md'
}
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { npmsearch } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "npmsearch"){
let search = await npmsearch(args[0])
if(search === "No se encontraron resultados para el npm: " + args[0]) return message.channel.send(`No se encontraron resultados`)
message.channel.send(`Nombre: ${search.nombre}\nVersion: ${search.version}`)
}
})
//Con la funcion de Infamous
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { Infamous } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "npmsearch"){
let infamous = new Infamous({
    Message: message
})
infamous.npmsearch(args.join(" "))
}
})

Binary:


Uso:

Conviertes o traduces algo del binario, binary({
    option: opcion,
    content: contenido
})
• opciones para la opcion: encode o decode
• opciones para el contenido: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |opcion| String| El tipo para la funcion de binario| |contenido| String| El contenido segun la opcion|

Ejemplo:

let { binary } = require("infamous-npm")
binary({
    option: "encode",
    content: "Hola"
}).then(res => console.log(res))
//retorna "01101000011011110110110001100001"
//Otro ejemplo
binary({
    option: "decode",
    content: "01101000011011110110110001100001"
}).then(res => console.log(res))
//retorna "hola"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { binary } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "binario"){
let binario = await binary({
    option: args[0],
    content: args.slice(1).join("  ")
})
message.channel.send(binario)
}
})

Tweet:


Uso:

Creas una imagen que represente un tweet falso, tweet({
    name: nombre,
    content: contenido
})
• opciones para el nombre: sin opciones
• opciones para el contenido: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |nombre| String| El nombre con el que saldras en el tweet| |contenido| String| El contenido del tweet|

Ejemplo:

let { tweet } = require("infamous-npm")
tweet({
    option: "Jorge.S",
    content: "Holaaa"
}).then(res => console.log(res))
//retorna "https://nekobot.xyz/imagegen/0/d/d/4fc81c9d3ebf713fed0383436d1b1.png"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { tweet } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "tweet"){
let tweeter = await tweet({
    option: args[0],
    content: args.slice(1).join("  ")
})
message.channel.send(tweeter)
}
})

Type:


Uso:

Miras que tipo tiene un string en JavaScript, type(contenido)
• opciones para el contenido: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |contenido| String| El contenido a ver su tipo|

Ejemplo:

let { type } = require("infamous-npm")
let test = "hola"
type(test === "hola" ? "Si" : "No").then(res => console.log(res))
//retorna "string"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { type } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "tipo"){
let tipo = await type(args.join(" "))
message.channel.send(tipo)
}
})

Lyrics:


Uso:

Obtienes la letra de una cancion, lyrics(nombre, autor)
• opciones para el nombre: sin opciones
• opciones para el autor: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |nombre| String| El nombre de la cancion| |autor| String| El nombre del autor de la cancion|

Ejemplo:

let { lyrics } = require("infamous-npm")
lyrics("Astronaunt In The Ocean", "Masked Wolf").then(res => console.log(res))
//retorna {
  letra: 'Astronaut\n' +
    '\n' +
    "What you know about rollin' down in the deep?\n" +
    'When your brain goes numb, you can call that mental freeze\n' +
    'When these people talk too much, put that shit in slow motion, yeah\n' +
    'I feel like an astronaut in the ocean, ayy\n' +
    "What you know about rollin' down in the deep?\n" +
    'When your brain goes numb, you can call that mental freeze\n' +
    'When these people talk too much, put that shit in slow motion, yeah\n' +
    'I feel like an astronaut in the ocean\n' +
    '\n' +
    "She say that I'm cool (Damn straight)\n" +
    `I'm like, "Yeah, that's true" (That's true)\n` +
    'I believe in G-O-D (Ayy)\n' +
    "Don't believe in T-H-O-T\n" +
    'She keep playing me dumb (Play me)\n' +
    "I'ma play her for fun (Uh-huh)\n" +
    "Y'all don't really know my mental\n" +
    'Let me give you the picture like stencil\n' +
    "Fallin' out in a drought\n" +
    "No flow, rain wasn't pourin' down (Pourin' down)\n" +
    'See, that pain was all around\n' +
    'See, my mode was kinda lounged\n' +
    "Didn't know which, which way to turn\n" +
    'Flow was cool but I still felt burnt\n' +
    'Energy up, you can feel my surge\n' +
    "I'ma kill everything like this purge (Ayy)\n" +
    '\n' +
    "Let's just get this straight for a second, I'ma work (Yuh)\n" +
    "Even if I don't get paid for progression, I'ma get it (Uh, get it)\n" +
    'Everything that I do is electric (Ayy)\n' +
    "I'ma keep it in a motion, keep it movin' like kinetic, ayy (Yeah, yeah, yeah, yeah, yeah)\n" +
    '\n' +
    "Put this shit in a frame, better know I don't blame\n" +
    'Everything that I say, man, I seen you deflate\n' +
    "Let me elevate, this ain't a prank\n" +
    "Have you walkin' on a plank, li-li-li-li-like\n" +
    'Both hands together, God, let me pray (Now let me pray), uh\n' +
    "I've been goin' right, right around, call that relay (Masked Wolf)\n" +
    "Pass the baton, back and I'm on\n" +
    "Swimmin' in the pool, Kendrick Lamar, uh (Ayy)\n" +
    'Want a piece of this, a piece of mine, my peace a sign\n' +
    'Can you please read between the lines?\n' +
    "My rhyme's inclined to break your spine (Spine)\n" +
    "They say that I'm so fine (Fine)\n" +
    'You could never match my grind (True)\n' +
    'Please do not, not waste my time (Wolf)\n' +
    '\n' +
    "What you know about rollin' down in the deep?\n" +
    'When your brain goes numb, you can call that mental freeze\n' +
    'When these people talk too much, put that shit in slow motion, yeah\n' +
    'I feel like an astronaut in the ocean, ayy\n' +
    "What you know about rollin' down in the deep?\n" +
    'When your brain goes numb, you can call that mental freeze\n' +
    'When these people talk too much, put that shit in slow motion, yeah\n' +
    'I feel like an astronaut in the ocean',
  imagen: 'https://images.genius.com/b9349537b1b2771ddbf0630751fa61e3.300x300x1.jpg'
}
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { lyrics } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "letra"){
let letra = await lyrics(args[0], args[1])
message.channel.send(letra.letra)
}
})

Ytcomment:


Uso:

Creas un comentario de YT falso, ytcomment(avatar, username, comment)
• opciones para el avatar: sin opciones
• opciones para el username: sin opciones
• opciones para el comment: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |avatar| String| El avatar del autor del comentario| |username| String| El nombre del autor del comentario| |comment| String| El contenido del comentario|

Ejemplo:

let { ytcomment } = require("infamous-npm")
ytcomment("https://cdn.discordapp.com/attachments/833409683824836628/854888618438033458/unknown.png", "Jorge.S", "Hola").then(res => console.log(res))
//retorna "https://some-random-api.ml/canvas/youtube-comment?avatar=https://cdn.discordapp.com/attachments/833409683824836628/854888618438033458/unknown.png&comment=Hola&username=Jorge.S"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { ytcomment } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "yt"){
let yt = await ytcomment(message.author.avatarURL({ format: "png" }), message.author.username, args.join(" "))
message.channel.send(new MessageAttachment(yt, "yt.png"))
}
})

Hex:


Uso:

Conviertes un codigo hex a rgb, hex(code)
• opciones para el code: el codigo hex pero sin #

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |code| String| El codigo del color hex|

Ejemplo:

let { hex } = require("infamous-npm")
ytcomment("BD8484").then(res => console.log(res))
//retorna { resultado: 'rgb(189,132,132)', r: 189, g: 132, b: 132 }
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { hex } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "hex"){
let code = await hex(args[0])
message.channel.send(code.resultado)
}
})

Rgb:


Uso:

Conviertes un codigo rgb a hex, rgb(r,g,b)
• opciones para el r: sin opciones
• opciones para el g: sin opciones
• opciones para el b: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |r| String| El codigo del valor r del rgb| |g| String| El codigo del valor g del rgb| |b| String| El codigo del valor b del rgb|

Ejemplo:

let { rgb } = require("infamous-npm")
rgb(193,109,109).then(res => console.log(res))
//retorna { hex: '#C16D6D' }
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { rgb } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "rgb"){
let code = await rgb(args[0])
message.channel.send(code.hex)
}
})

Shortnumber:


Uso:

Conviertes un numero largo a uno corto, shortnumber(numero)
• opciones para el numero: sin opciones

Parametros:

|Nombre del parametro| Tipo| Descripcion| |--------------------| ----| -------------------------------| |numero| Number| El numero a acortar|

Ejemplo:

let { shortnumber } = require("infamous-npm")
shortnumber(538230).then(res => console.log(res))
//retorna "538.23 mil"
//Con discord.js
let { Discord, MessageEmbed, MessageAttachment } = require("discord.js")
let { shortnumber } = require("infamous-npm")
let prefix = "."
client.on("message", async (message) => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix).trim().split(/ +/g);
const command = args.shift();
if(command === "acortar"){
let numero = await shortnumber(args[0])
message.channel.send(numero)
}
})

Informacion:


Si el package esta en una version en la que solo cambio la decimal del 
segundo punto (1.0.3 <== este) es porque se cambio algo del Readme, pero si 
el package tiene una version donde cambio la decimal del primer punto 
(1.0 <== este) es porque se arreglaron errores de alguna funcion o se 
cambiaron funciones y si el package esta en una version en la que el primer 
numero cambio (1 <== este) es porque se agrego una nueva funcion

Si alguna funcion tiene a su lado (beta) es porque la funcion probablemente tenga errores en un futuro, 
si te sucede uno puedes unirte al server del creador y comentar esto

La funcion de que infamous-npm mande mensajes por ti esta en beta, es decir, solo unas funciones la tienen
Otra cosa acerca de esto es que para que mande mensajes por ti tienes que poner el code de otra manera, los ejemplos estan en las funciones 

Si tienes errores unete al servidor oficial:


Servidor

Creador:


bestking911 | 𝓙𝓸𝓻𝓰𝓮.𝓢#0809

Regresar al inicio