New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elara-react

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elara-react

Elara's reaction handler, for embed-pages and embed-menus

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Getting Started

RichDisplay

const { RichDisplay } = require("elara-react"),
      { MessageEmbed } = require("discord.js");

const menu = new RichDisplay(new MessageEmbed())

menu.addPage(embed => {
    embed.setTitle(`Title!`)
    return embed;
});

menu.run(await message.channel.send(`Loading, one moment please!`), { filter: (react, user) => user.id === message.author.id })

// Only include 
// , { filter: (react, user) => user.id === message.author.id }
// If you want it to be locked to the message author. 

RichMenu

const { RichMenu } = require("elara-react"),
      { MessageEmbed } = require("discord.js");

const menu = new RichMenu(new MessageEmbed())

menu.addOption(`Option 1`, `Description for the option`);
// Up to 10 options.

let msg = await message.channel.send(`Loading, one moment please.`),
    collector = await menu.run(msg, { filter: (react, user) => user.id === message.author.id }),
    choice = await collector.selection;
if(choice === null || choice === undefined) return msg.edit(`You didn't provide a choice?`);

// returns a number.
// 0-9
if(choice === 1) return msg.edit(`You've selected option 1!`); 
// Only include 
// , { filter: (react, user) => user.id === message.author.id }
// If you want it to be locked to the message author. 

FAQs

Package last updated on 14 Mar 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