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

utility-discord

v2.1.3

Published

Easy Use & Save Data For Credits In Discord & Safe

Downloads

38

Readme

- Installation

  • You need to install the package on your project
npm install utility-discord@latest canvas

Quick access

Credit Commands


Level Commands


Images


(1) Set Money

const djs = require('utility-discord');

djs.setMoney(userID, amount); // To Set a Money For User

djs.setMoney(`123456789`, 0); // The Amount Must Be A Number
djs.setMoney(`123465789`, 15000);

(2) Get Money

djs.getMoney(userID); // To Get a Money For User

djs.getMoney(`123456789`);
console.log(djs.getMoney(`123456789`));

(3) Delete Money

djs.delMoney(userID); // To Delete a Money For User
djs.delMoney(`123456789`);

(4) Has Money

djs.hasMoney(userID); // If Find Data Get True, If Don't Find Data Get False
djs.hasMoney(`123456789`) true or false;

(5) Add Money

djs.addMoney(userID, amount); // To Add a Money For User

djs.addMoney(`123456789`, 10); // The Amount Must Be A Number
djs.addMoney(`123456789`, 5000);

(6) Subtract Money

djs.subMoney(userID, amount); // To Subtract a Money For User

djs.subMoney(`123456789`, 10); // The Amount Must Be A Number
djs.subMoney(`123456789`, 5000);

(7) Set Level Channel

djs.setLevelChannel(channelID, guildID); // To Set a Level Channel
djs.setLevelChannel("123465789", "12345");

(8) Set Rep

djs.setRep(userID, amount); // To Set a Rep
djs.setRep("123465789", 10);

(9) Get Level For User

djs.getLevel(userID, guildID); // To Get Level For User
message.channel.send({ content: `Level For ${message.author} = ${djs.getLevel(message.author.id, message.guild.id)}` });

(10) Get XP For User

djs.getXP(userID, guildID); // To Get XP For User
message.channel.send({ content: `XP For ${message.author} = ${djs.getXP(message.author.id, message.guild.id)}` });

(11) Get Rep For User

djs.getRep(userID); // To Get Rep For User
message.channel.send({ content: `Rep For ${message.author} = ${djs.getRep(message.author.id)}` });

(12) Get Level Channel

djs.getLevelChannel(guildID); // To Get Level Channel ID
message.channel.send({ content: `Level Channel ID = ${djs.getLevelChannel(message.guild.id)}` });

(13) Profile

djs.profile({ // To Send Profile Card
  user: user, 
  guild: guild, 
  level: level, 
  rep: rep, 
  rank: rank, 
  credits: credits, 
  text: text, // Text Optional
  background: background // Background Optional
});

djs.profile({ // To Send Profile Card
  user: message.author, 
  guild: message.guild, 
  level: 1, 
  rep: 0, 
  rank: 1, 
  credits: 0, 
  text: "Free Palestine ♥",
}).then((attach) => {
  message.channel.send({ files: [attach] });
});

(14) Rank

djs.rank({ // To Send Rank Card
  user: user, 
  guild: guild, 
  level: level, 
  xp: xp, 
  background: background // Background Optional
});

djs.rank({
  user: message.author, 
  guild: message.guild, 
  level: 1, 
  xp: 350
}).then((attach) => {
  message.channel.send({ files: [attach] });
});

(15) Append XP

djs.appendXP(userID, guildID);

client.on("messageCreate", (message) => {
  if (!message.guild || message.author.bot) return;
  const appendXP = djs.appendXP(message.author.id, message.guild.id);
  if (appendXP) {
    if (!djs.getLevelChannel(message.guild.id)) return;
    const ch = djs.getLevelChannel(message.guild.id);
    const level = djs.getLevel(message.author.id, message.guild.id);
    const LevelChannel = message.guild.channels.cache.get(ch);
    if (!LevelChannel) return;
    LevelChannel.send({ content: `> **GG ${message.author}, you just leveled up to level ${level}** 🥳` }).catch((err) => { return; });
  }
});

(16) Add Rep

djs.addRep(userID); // To Add 1 Rep For User

djs.addRep(message.author.id);
message.channel.send({ content: `Done Add 1 Rep For ${message.author}` });

(17) Set XP

djs.setXP(userID, guildID, xp); // To Set XP For User

djs.setXP(message.author.id, message.guild.id, 1000); // XP Must Be A Number
message.channel.send({ content: `Done Set XP For ${message.author} To ${djs.getXP(message.author.id, message.guild.id)}` });

(18) Set Level

djs.setLevel(userID, guildID, level); // To Set Level For User

djs.setLevel(message.author.id, message.guild.id, 5); // Level Must Be A Number
message.channel.send({ content: `Done Set Level For ${message.author} To ${djs.getLevel(message.author.id, message.guild.id)}` });

(19) Subtract XP

djs.subtractXP(userID, guildID, xp); // To Subtract XP For User

djs.subtractXP(message.author.id, message.guild.id, 1000); // XP Must Be A Number
message.channel.send({ content: `Done Subtract XP For ${message.author} To ${djs.getXP(message.author.id, message.guild.id)}` });

(20) Subtract Level

djs.subtractLevel(userID, guildID, level); // To Subtract Level For User

djs.subtractLevel(message.author.id, message.guild.id, 5); // Level Must Be A Number
message.channel.send({ content: `Done Subtract Level For ${message.author} To ${djs.getLevel(message.author.id, message.guild.id)}` });

(21) Subtract Rep

djs.subtractRep(userID, level); // To Subtract Rep For User

djs.subtractRep(message.author.id, 5); // Rep Must Be A Number
message.channel.send({ content: `Done Subtract Rep For ${message.author} To ${djs.getRep(message.author.id)}` });

(22) Welcome

djs.welcome(userID, guild, background); // To Make a Welcome Image
// Background Optional

client.on("guildMemberAdd", (member) => {
  djs.welcome(member.id, member.guild).then((attach) => {
    member.guild.channels.cache.get("channel id").send({ content: `Welcome Man 💙`, files: [attach] });
  });
});

(23) Bye

djs.bye(user, guild, background); // To Make a Bye Image
// Background Optional

client.on("guildMemberRemove", (member) => {
  djs.bye(member, member.guild).then((attach) => {
    member.guild.channels.cache.get("bye channel id").send({ content: `Bye !`, files: [attach] });
  });
});

Images


- If You Need Change Background For Profile


  • https://i.imgur.com/OeDnJRE.png
  • https://i.imgur.com/Q0Vh1j7.jpg
  • https://i.imgur.com/IUS4VLH.jpg
  • https://i.imgur.com/hMiiJbn.png
  • https://i.imgur.com/9KNV4NP.png
  • https://i.imgur.com/FGIH8lh.png
  • https://i.imgur.com/QOXl8xC.png
  • https://i.imgur.com/FkZ4TGN.png
  • https://i.imgur.com/0qRcN2t.png
  • https://i.imgur.com/6ujV0Jt.jpg

- If You Need Change Background For Rank Card


  • https://i.imgur.com/iFTlNkh.png
  • https://i.imgur.com/djFYRsw.jpg
  • https://i.imgur.com/CuUVsL6.jpg
  • https://i.imgur.com/65kTYm8.jpg
  • https://i.imgur.com/TmdVI6n.jpg
  • https://i.imgur.com/lCPRAVM.jpg
  • https://i.imgur.com/tL2dXA0.jpg
  • https://i.imgur.com/QDbUgm2.jpg
  • https://i.imgur.com/b26OVwW.jpg

- If You Need Change Background For Welcome


  • https://i.imgur.com/b26OVwW.jpg
  • https://i.imgur.com/tL2dXA0.jpg
  • https://i.imgur.com/CuUVsL6.jpg
  • https://i.imgur.com/65kTYm8.jpg
  • https://i.imgur.com/M2O3nGm.jpg

- If You Need Change Background For Bye


  • https://i.imgur.com/gVERZ7c.jpg
  • https://i.imgur.com/BNvKnmk.jpg
  • https://i.imgur.com/CZlfryI.png

Developer Information

  • ✨ Developer: SLASH
  • 📞 Contact: Discord