Skip to content
Classcorev0.14.0

Silence

Throw to stop a handler without a reply or a report.

The framework boundary catches Silence before Notice, makes zero Discord calls, and stops. Ideally you'd only throw this in EventHandlers (or Gates for those) because it doesn't make sense to leave the user without a reply for an interaction.

class Silence extends Error
import { Silence } from '@seedcord/gateway';

// a helper under a guildMemberAdd handler, stopping when this guild configured nothing to send
const template = await settings.welcome(member.guild.id);
if (!template) throw new Silence('no welcome message set');

Member visibility

Filter class members by access level.

constructor

Constructs a new instance of the Silence class

Silence(reason?: string | undefined)
Parameter: reason

Optional note written only to a debug log, never shown to the user or reported.

Showing members with Protected visibility and higher.

Properties