js-discord-modularcommand 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/registercommand.js +1 -1
- package/dist/types.d.ts +1 -3
- package/package.json +1 -1
package/dist/registercommand.js
CHANGED
|
@@ -254,7 +254,7 @@ function getCommandLocale(command, interaction) {
|
|
|
254
254
|
function createChatInputExecutor(command, options) {
|
|
255
255
|
return async (interaction) => {
|
|
256
256
|
// Permission & NSFW Checks
|
|
257
|
-
if (command.permissionCheck && !command.permissionCheck(
|
|
257
|
+
if (command.permissionCheck && !command.permissionCheck(interaction)) {
|
|
258
258
|
await interaction.reply({ content: locales_1.LOCALE_FORBIDDEN[interaction.locale], flags: discord_js_1.MessageFlags.Ephemeral });
|
|
259
259
|
return;
|
|
260
260
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -163,6 +163,4 @@ export type SelectMenuExecuteFunction = (params: SelectMenuExecuteParams) => Pro
|
|
|
163
163
|
* @description Defines the signature for a function that checks a user's permissions to execute a command.
|
|
164
164
|
* @returns {boolean | Promise<boolean>} `true` if the user has permission, `false` otherwise.
|
|
165
165
|
*/
|
|
166
|
-
export type PermissionCheckFunction = (
|
|
167
|
-
interaction: CommandInteraction;
|
|
168
|
-
}) => boolean | Promise<boolean>;
|
|
166
|
+
export type PermissionCheckFunction = (interaction: CommandInteraction) => boolean | Promise<boolean>;
|