© 2026 Hedgehog Software, LLC
const { Precondition } = require("@sapphire/framework"); class DMPrecondition extends Precondition { constructor(context, options) { super(context, { ...options, position: 3, }); } async contextMenuRun(interaction) { if (!interaction.guild) return interaction.reply({ content: "You cannot use this on a DM.", ephemeral: true, }); if (interaction.guild) { return this.ok(); } else { console.log(this.error()); return this.error(); } } async messageRun() { this.ok(); } } module.exports = { DMPrecondition, };