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

@gary50613/discord.js-command-handler

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gary50613/discord.js-command-handler - npm Package Compare versions

Comparing version 2.4.4 to 2.5.0

src/handler/EventHandler.js

2

package.json
{
"name": "@gary50613/discord.js-command-handler",
"version": "2.4.4",
"version": "2.5.0",
"description": "simple discord.js command handler",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,2 +0,2 @@

# djs-command-handler
# discord.js-command-handler
> Simple command handler for discord.js

@@ -3,0 +3,0 @@

@@ -5,6 +5,5 @@ const Group = require("../base/Group")

const Util = require("../Util")
const EventHandler = require("../handler/EventHandler")
const EventEmitter = require("events").EventEmitter
class CommandManager extends EventEmitter {
class CommandManager extends EventHandler {
constructor(bot, options) {

@@ -11,0 +10,0 @@ super()

const Interaction = require("../base/Interaction")
const InteractionHandler = require("../handler/InteractionHandler")
const Util = require("../Util")
const EventEmitter = require("events").EventEmitter
const EventHandler = require("../handler/EventHandler")
class InteractionManager extends EventEmitter {
class InteractionManager extends EventHandler {

@@ -8,0 +8,0 @@ constructor(bot, options) {

import { Message, MessageEmbed, Client, PermissionResolvable, GuildMember, Guild } from "discord.js"
import { EventEmitter } from "events"

@@ -88,3 +87,8 @@ declare module "@gary50613/discord.js-command-handler" {

declare class CommandManager extends EventEmitter {
declare class EventHandler {
public emit(name: string, ...args: any): void
public removeListener(name: string, listener: void): void
}
declare class CommandManager extends EventHandler {
public commands: Command[]

@@ -111,6 +115,11 @@ public groups: Map<string, Group>

public on(name: 'dm', listener: (message: Message) => void): this
public on(name: 'ratelimit', listener: (time: number) => void): this
public on(name: 'execute', listener: (command: Command, message: Message) => void): this
public on(name: 'error' | 'promiseError', listener: (error: Error, command: Command, message: Message) => void): this
public ratelimit?: RatelimitManager
}
declare class InteractionManager extends EventEmitter {
declare class InteractionManager extends EventHandler {
public interactions: Map<string, Interaction>

@@ -122,2 +131,5 @@ public bot: Client

public loadFolder(folderPath: string): void
public on(name: 'execute', listener: (executor: Interaction, handler: InteractionHandler) => void): this
public on(name: 'error' | 'promiseError', listener: (error: Error, executor: Interaction, handler: InteractionHandler) => void): this
}

@@ -133,2 +145,8 @@

export class Util{
public static isObject(o:any):boolean
public static assignObject<K,T extends Object>(o:K,t:T):K
public static loadFolder(fPath:string):Command[]
}
declare module "discord.js" {

@@ -135,0 +153,0 @@ export interface Client {

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