utility-discord
v2.1.3
Published
Easy Use & Save Data For Credits In Discord & Safe
Downloads
59
Maintainers
Readme
- Installation
- You need to install the package on your project
npm install utility-discord@latest canvas
Quick access
Credit Commands
Level Commands
- Set Level Channel
- Set Rep
- Get Level For User
- Get XP For User
- Get Rep For User
- Get Level Channel
- Profile
- Rank
- Append XP
- Add Rep
- Set XP
- Set Level
- Subtract XP
- Subtract Level
- Subtract Rep
- Welcome
- Bye
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