Socket
Socket
Sign inDemoInstall

@kimusoft/discord-menu

Package Overview
Dependencies
2
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @kimusoft/discord-menu

> Use Discord components without unnecessarily long codes. * Typescript * discord.js v14.3.0


Version published
Maintainers
2
Install size
2.24 MB
Created

Readme

Source

Discord Menu Library

Use Discord components without unnecessarily long codes.

  • Typescript
  • discord.js v14.3.0

Features

  • Sample discord button component menus
  • Simple discord select menu component menus
  • Simple pagination component

Examples

Yes or No Button

async function yesNoTest(i: ChatInputCommandInteraction) {
  // Send a message with buttons with Yes and No.
  const resI = await i.sendMenu({
    content: "Do you know Gangnam Style?",
    menu: new YesNoMenu(),
  })

  // Returns void if the response time limit has been exceeded.
  if (!resI) return i.editReply({ content: "Timeout!" })

  // You can check which button the user pressed through 'resI.customId'
  switch (resI.customId) {
    case CustomId.YesButton:
      return i.editReply({ content: "You choose Yes!" })
    case CustomId.NoButton:
      return i.editReply({ content: "You choose No!" })
  }
}

Keywords

FAQs

Last updated on 06 Sep 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc