Skip to content
Functioncorev0.14.0

and

Runs each gate in order and refuses on the first refusal. Takes two or more gates. An event-only and an interaction-only gate cannot be combined because the required context is the intersection of their contexts.

See also:or

and<Gates>(
    gates: Gates
): Gate<
    IntersectRequired<Gates> & GateContextBase,
    JoinNames<Gates, " & ">
>
import { PermissionFlagsBits } from 'discord.js';

\@Gated(and(GuildOnly(), RequirePermissions([PermissionFlagsBits.BanMembers])))
\@SlashRoute('ban')
class BanHandler extends SlashHandler<'ban'> {
    async execute() {
        // ...
    }
}

Gates

The tuple of two or more gates, run left to right.

Gates

The tuple of two or more gates, run left to right.

gates

gates: Gates

The gates to run in order, all refused on the first refusal.