Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
discord-menus
Advanced tools
npm install discord-menus@latest
const { DiscordMenus } = require('discord-menus');
// Or typescript
import { DiscordMenus } from 'discord-menus';
All the code examples are available in the tests
folder of the project, available on Github, the documentation is coming soon, for more information, join the RemyK Discord server
const { DiscordMenus, ButtonBuilder, MenuBuilder } = require('discord-menus');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client();
const MenusManager = new DiscordMenus(client);
const myCoolMenu = new MenuBuilder()
.addLabel('Value 1', { description: 'This the value 1 description', value: 'value-1' })
.addLabel('Value 2', { description: 'This is the value 2 description', value: 'value-2' })
.addLabel('Value 3', {
description: 'This is the value 3 description (with an emoji)', value: 'value-3', emoji: {
name: '🌌'
}
})
.setMaxValues(3)
.setMinValues(1)
.setCustomID('cool-custom-id')
.setPlaceHolder('Select an option');
client.on('message', async (message) => {
if (message.content === 'menu') {
await MenusManager.sendMenu(message, new MessageEmbed().setDescription('Hello world!'), { menu: myCoolMenu }).then(msg => {
console.log(msg.id);
await msg.edit('Some edit', { ephemeral: true });
})
}
});
MenusManager.on('MENU_CLICKED', (menu) => {
menu.reply('some reply')
console.log(menu.values);
});
client.login('');
You can join the RemyK Dev Discord server using this link
This package is under Apache-2.0 license
FAQs
Create beautiful menus in Discord, with ease!
The npm package discord-menus receives a total of 7 weekly downloads. As such, discord-menus popularity was classified as not popular.
We found that discord-menus 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.