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

erine

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

erine

A powerful discord.js framework to use in your bot!

  • 1.0.5
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-23.53%
Maintainers
1
Weekly downloads
 
Created
Source

Erine

A powerful commands framework for discord.js

Install

npm install erine

Features

  • Hybrid Commands
  • Hybrid Groups
  • Command Handler
  • Events Handler
  • Plugins
  • Discord.py interface
  • Prefix interpreter
  • Context base class

Example (Setup)

const { ErineClient } = require("erine");
const { GatewayIntentBits } = require("discord.js");

const client = new ErineClient({
  intents: [
    GatewayIntentBits.Guilds
  ],
  prefix: "!"
});

client.login("TOKEN");

Example (Command loader)

client.load_commands("./path/to/commands");

Example (Event loader)

client.load_events("./path/to/events");

Example (Hybrid Command)

const { HybridBuilder, ParamsBuilder } = require("erine");

const body = {
    data: new HybridBuilder()
    .setName('ping')
    .setAliases('pong')
    .setDescription('This works with ![ping|pong] and /ping'),
    params: new ParamsBuilder()
    .addMember({ name: 'myMember', description: 'The member', required: false }),
    async code(ctx) {
        await ctx.send({ content: `Pong! ${ctx.author.username}`, ephemeral: true })
    }
}

module.exports = { body } // important to be named 'body'

Example (Hybrid Group)

const { HybridGroup, ParamsBuilder, HybridBuilder } = require("erine");

const body = new HybridGroup()
.setName('parent')
.setDescription('This is the parent of all')
.addCommand({
    data: new HybridBuilder()
    .setName('child-one')
    .setDescription('This can be used as: !parent child-one or /parent child-one'),
    async code(ctx) {
        await ctx.send(`My parent is: ${ctx.parent.name}`)
    }
})

module.exports = { body }

🌙 Made by Moonlight Group members.

  • Cyberghxst#2683 (Package idea)
  • Mid#1044 (Main developer)

Keywords

FAQs

Package last updated on 05 Jan 2023

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