Skip to content

KimuSoft/discord-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!" })
  }
}

About

I'll be Componet Master!!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published