Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
easy-discord-economy
Advanced tools
With npm ```js npm i easy-discord-economy ``` With yarn ```js yarn add easy-discord-economy ```
With npm
npm i easy-discord-economy
With yarn
yarn add easy-discord-economy
We need to include the module to our project
const Eco = require('easy-discord-economy')
And set the mongodb url
Eco.setUrl('mongodb://...') //You only need to set this up once
#Methods createUser
Creates an entry in database for that user if it doesnt exist.
Eco.createUser(userId: string, guildId: string);
Promise<Object>
deleteUser
If the entry exists, it deletes it from database.
Eco.deleteUser(userId: string,
guildId: string);
Promise<Object>
add
Add a specific amount of money to wallet or bank in the database
Eco.add(userId: string, guildId: string, amount: number);
Promise<Boolean>
subtract
Subtract specific amount of money in wallet or bank in the database
Eco.subtract(userId: string, guildId: string, amount: number);
Promise<Boolean>
setMoney
Set a specific amount of money for a user
Eco.setMoney(userId: string, guildId: string, amount: number);
Promise<Boolean/Object>
setBank
Set a specific amount of money for a user
Eco.setBank(userId: string, guildId: string, amount: number);
Promise<Boolean/Object>
fetch
Retrives selected entry from the database, if it exists.
Eco.fetch(userId: string, guildId: string);
Promise<Object>
fetchLeaderboard
It gets a specified amount of entries from the database, ordered from higgest to lowest within the specified limit of entries.
Eco.fetchLeaderboard(guildId: string, limit: number);
Promise<Array [Objects]>
computeLeaderboard
It returns a new array of object that include money, bank, guild id, user id, leaderboard position, username and discriminator.
Eco.fetch(client: Your discord client, guildId: string);
// Yes ik i borrowed some code from https://github.com/MrAugu/discord-xp
Promise<Array [Objects]>
work
A built in work command (kinda useless :l)
Eco.work(userId: string, guildId: string);
Promise<Boolean>
FAQs
A discord economy package that use mongo database for beginner
The npm package easy-discord-economy receives a total of 0 weekly downloads. As such, easy-discord-economy popularity was classified as not popular.
We found that easy-discord-economy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.