@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
1 lines • 940 B
Source Map (JSON)
{"version":3,"sources":["../../../../src/lib/precondition-resolvers/nsfw.ts"],"names":[],"mappings":";;;AAQO,SAAS,iCAAA,CAAkC,MAA2B,0BAAwD,EAAA;AACpI,EAAA,IAAI,IAAM,EAAA,0BAAA,CAA2B,MAAO,CAAA,oBAAA,CAAqB,cAAc,CAAA;AAChF;AAFgB,MAAA,CAAA,iCAAA,EAAA,mCAAA,CAAA","file":"nsfw.mjs","sourcesContent":["import { CommandPreConditions } from '../types/Enums';\nimport type { PreconditionContainerArray } from '../utils/preconditions/PreconditionContainerArray';\n\n/**\n * Appends the `NSFW` precondition if {@link SubcommandMappingMethod.nsfw} is set to true.\n * @param nsfw Whether this command is NSFW or not.\n * @param preconditionContainerArray The precondition container array to append the precondition to.\n */\nexport function parseConstructorPreConditionsNsfw(nsfw: boolean | undefined, preconditionContainerArray: PreconditionContainerArray) {\n\tif (nsfw) preconditionContainerArray.append(CommandPreConditions.NotSafeForWork);\n}\n"]}