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.1.3 to 2.2.0

.github/workflows/node.js.yml

6

handler/InteractionHandler.js

@@ -14,6 +14,8 @@ const InteractionResponse = require("../Base/InteractionResponse")

if(this.interaction?.member)
this.member = this.interaction.member
if(this.interaction?.guild_id)
this.guild = bot.guilds.cache.get(this.interaction?.guild_id)
if(this.interaction?.member?.user?.id) {
this.member = this.guild?.members?.cache?.get(this.interaction?.member?.user?.id)
this.author = this.bot?.users?.cache?.get(this.interaction?.member?.user?.id)
}
if(this.interaction?.channel_id)

@@ -20,0 +22,0 @@ this.channel = bot.channels.cache.get(this.interaction?.channel_id)

@@ -25,3 +25,3 @@ const Interaction = require("../Base/Interaction")

let handler = new InteractionHandler(bot, interaction)
executor.execute(bot, handler, interaction?.data?.options, interaction?.member)
executor.execute(bot, handler, interaction?.data?.options)
.then(() => this.emit("execute", executor, handler))

@@ -28,0 +28,0 @@ .catch((e) => this.emit("promiseError", e, executor, handler))

{
"name": "@gary50613/discord.js-command-handler",
"version": "2.1.3",
"version": "2.2.0",
"description": "simple discord.js command handler",

@@ -11,2 +11,3 @@ "main": "index.js",

"scripts": {
"build": "npm i --save-dev",
"test": "cd test && node index"

@@ -33,5 +34,5 @@ },

"homepage": "https://github.com/Gary50613/discordjs-command-handler#readme",
"dependencies": {
"devDependencies": {
"discord.js": "^12.5.3"
}
}

@@ -20,4 +20,10 @@ const Discord = require('discord.js')

bot.on('ready', () => console.log('bot ready'))
bot.on('ready', () => {
console.log('bot ready')
})
bot.login(process.env.TOKEN)
bot.login(process.env.TOKEN)
.catch(e => {
console.error(e)
process.exit(0)
})

@@ -12,3 +12,3 @@ const Interaction = require("../../Base/Interaction")

async execute(bot, interaction, options, member) {
async execute(bot, interaction, options) {
let emb = await interaction.reply("pog!")

@@ -15,0 +15,0 @@ await emb.edit({

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