Skip to content

PopiiSilentError

Popii


Popii / PopiiSilentError

Defined in: utils/error.ts:67

Silently aborts a command handler without sending a reply or logging an error.

Useful when you’ve already responded to the interaction (e.g. via pop.defer() followed by sending a message to a channel) and want to stop further execution cleanly. errorHandlerPlugin() swallows this error — nothing reaches the user.

import { PopiiSilentError } from "popii";
async do(pop) {
await pop.defer({ ephemeral: true });
if (!conditionMet) {
throw new PopiiSilentError(); // stop execution silently
}
await pop.reply("Done!");
}
  • Error

new PopiiSilentError(): PopiiSilentError

Defined in: utils/error.ts:68

PopiiSilentError

Error.constructor