function missingCommandPermission(
  message,
  missingPermissions,
  type,
) {
  const perms = missingPermissions.join(", ");
  const response = type === "framework/core:BOT_CHANNEL_PERM"
    ? `I am missing the following permissions in this channel: **${perms}**`
    : type === "framework/core:BOT_SERVER_PERM"
    ? `I am missing the following permissions in this server from my roles: **${perms}**`
    : type === "framework/core:USER_CHANNEL_PERM"
    ? `You are missing the following permissions in this channel: **${perms}**`
    : `You are missing the following permissions in this server from your roles: **${perms}**`;
  if (
    missingPermissions.find((perm) =>
      perm === "SEND_MESSAGES" || perm === "VIEW_CHANNEL"
    )
  ) {
    return;
  }
  message.reply(response);
}
/** This function can be overriden to handle when a command has a mission permission. */
This function can be overriden to handle when a command has a mission permission.
This function can be overriden to handle when a command has a mission permission .
function missingCommandPermission(
  message,
  missingPermissions,
  type,
) {
  const perms = missingPermissions.join(", ");
  const response = type === "framework/core:BOT_CHANNEL_PERM"
    ? `I am missing the following permissions in this channel: **${perms}**`
    : type === "framework/core:BOT_SERVER_PERM"
    ? `I am missing the following permissions in this server from my roles: **${perms}**`
    : type === "framework/core:USER_CHANNEL_PERM"
    ? `You are missing the following permissions in this channel: **${perms}**`
    : `You are missing the following permissions in this server from your roles: **${perms}**`;
  if (
    missingPermissions.find((perm) =>
      perm === "SEND_MESSAGES" || perm === "VIEW_CHANNEL"
    )
  ) {
    return;
  }
  message.reply(response);
}
function missingCommandPermission ( message , missingPermissions , type , ) { const perms = missingPermissions . join ( ", " ) ; const response = type === "framework/core:BOT_CHANNEL_PERM" ? ` ${ perms } ` : type === "framework/core:BOT_SERVER_PERM" ? ` ${ perms } ` : type === "framework/core:USER_CHANNEL_PERM" ? ` ${ perms } ` : ` ${ perms } ` ; if ( missingPermissions . find ( ( perm ) => perm === "SEND_MESSAGES" || perm === "VIEW_CHANNEL" ) ) { return ; } message . reply ( response ) ; }
This function can be overriden to handle when a command has a mission permission.
This function can be overriden to handle when a command has a mission permission .