const { PermissionFlagsBits } = require('discord.js')

module.exports = {
  data: {
    name: 'ping',
    description: 'Health-check — replies pong if the bot is alive and staff-permitted.',
    // Restricted by default to members with Moderate Members — proves slash
    // commands can be permission-gated via Discord's own permission model,
    // per the spec's "restrict staff commands via Discord's permission system".
    default_member_permissions: PermissionFlagsBits.ModerateMembers.toString(),
  },
  async execute(interaction) {
    await interaction.reply({ content: 'pong', ephemeral: true })
  },
}
