diff --git a/dist/SlashCommands.js b/dist/SlashCommands.js index a62ed1a..ce08957 100644 --- a/dist/SlashCommands.js +++ b/dist/SlashCommands.js @@ -60,6 +60,8 @@ var SlashCommands = /** @class */ (function () { return __generator(this, function (_a) { member = interaction.member, data = interaction.data, guild_id = interaction.guild_id, channel_id = interaction.channel_id; name = data.name, options = data.options; + if (!name) + return [2 /*return*/]; command = name.toLowerCase(); guild = this._client.guilds.cache.get(guild_id); args = this.getArrayFromOptions(guild, options); diff --git a/src/SlashCommands.ts b/src/SlashCommands.ts index 47eb5d2..671dc1f 100644 --- a/src/SlashCommands.ts +++ b/src/SlashCommands.ts @@ -23,6 +23,7 @@ class SlashCommands { this._client.ws.on("INTERACTION_CREATE", async (interaction) => { const { member, data, guild_id, channel_id } = interaction; const { name, options } = data; + if(!name) return const command = name.toLowerCase(); const guild = this._client.guilds.cache.get(guild_id);