@gary50613/discord.js-command-handler
Advanced tools
Comparing version 2.1.3 to 2.2.0
@@ -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({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19114
0
18
374
1
- Removeddiscord.js@^12.5.3
- Removed@discordjs/collection@0.1.6(transitive)
- Removed@discordjs/form-data@3.0.1(transitive)
- Removedabort-controller@3.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removeddiscord.js@12.5.3(transitive)
- Removedevent-target-shim@5.0.1(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedprism-media@1.3.5(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedtr46@0.0.3(transitive)
- Removedtweetnacl@1.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedws@7.5.10(transitive)