
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
@einsyntax/discord-perms
Advanced tools
Create and manage own permissions for discord.js! with mongodb
This package is meant to provide an easy way to create and use own discord.js permissions, all data is stored with mongodb
Installation
npm i @einsyntax/discord-perms
Require Package
var permissions = require('discord-perms')
Discord Perms is an easy-to-use permissions manager built with mongodb/mongoose. It's simple and perfect for smaller projects, with Discord Perms you can create your own permissions for discord.js! the permissions are processed via MongoDB.
const permissions = require('discord-perms')
// Set the mongodb url and connect to database(For example do it in the ready event of discord.js):
permissions.setmongoURL('mongourl');
// To create a user:
permissions.createUser(userID, guildID);
//Example:
permisions.createUser("390810485244821505", "653154689218641930")
// To delete a user:
permissions.deleteUser(userID, guildID);
//Example:
permisions.deleteUser("390810485244821505", "653154689218641930")
// Add a permission to a user:
permissions.addPermission(userID, guildID, permission)
//Example:
permisions.addPermission("390810485244821505", "653154689218641930", "bot.moderator")
// Remove a permission from a user:
permissions.removePermission(userID, guildID, permission)
//Example:
permisions.removePermission("390810485244821505", "653154689218641930", "bot.moderator")
// Check if user has a permission
permissions.hasPermission("390810485244821505", "653154689218641930", "bot.moderator")
//Example:
if (await permissions.hasPermission(message.author.id, message.guild.id, "bot.admin")) {
console.log("HE HAS THE PERMISSION!")
} else {
console.log("HE HASN'T THE PERMISSION!")
}
//PLEASE USE THIS WITH await
Create an issue on the Github respository
FAQs
Create and manage own permissions for discord.js! with mongodb
We found that @einsyntax/discord-perms 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
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.