Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-menus

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-menus

Create beautiful menus in Discord, with ease!

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-22.22%
Maintainers
1
Weekly downloads
 
Created
Source

drawing

Made with Typescript


🔩 Installation

npm install discord-menus@latest

🌌 Setup

const { DiscordMenus } = require('discord-menus');
// Or typescript
import { DiscordMenus } from 'discord-menus';

💻 Code example

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('');

📷 Image

Image 1


Image 2


👥 Contact

Discord Banner 1

You can join the RemyK Dev Discord server using this link

🚀 Others

This package is under Apache-2.0 license

Github repository

Made with ❤ by RemyK

Keywords

FAQs

Package last updated on 19 Jul 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc