Skip to content
Functiongatewayv0.11.0

Nsfw

Requires an age-restricted channel, else refuses. Pass a Notice class as notice to replace the refusal.

A thread inherits its parent channel's nsfw flag. ModalSubmit is excluded because it doesn't have a reliable channel.

See also:Gated

\@Gated(Nsfw())
\@SlashRoute('nsfwcmd')
class NsfwHandler extends SlashHandler<'nsfwcmd'> {
    async execute() {
        // ...
    }
}

options?

Replace the refusal with a Notice class as notice.