UNPKG

@castery/caster-discord

Version:

🤖⛓️ The Discord platform for caster

74 lines (59 loc) 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultOptionsSchema = exports.defaultOptions = exports.supportedAttachmentTypes = exports.supportedContextTypes = exports.PLATFORM_NAME = void 0; var _joi = _interopRequireDefault(require("joi")); var _caster = require("@castery/caster"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Platform context name * * @type {string} */ const PLATFORM_NAME = 'discord'; /** * Supported platform types * * @type {Object} */ exports.PLATFORM_NAME = PLATFORM_NAME; const supportedContextTypes = _caster.MessageContext.defaultSupportedContextTypes({ message: true }); /** * Supported platform attachments * * @type {Object} */ exports.supportedContextTypes = supportedContextTypes; const supportedAttachmentTypes = _caster.MessageContext.defaultSupportedAttachmentTypes({ image: true, video: true, document: true }); /** * Default options platform * * @type {Object} */ exports.supportedAttachmentTypes = supportedAttachmentTypes; const defaultOptions = { id: null, adapter: {}, prefix: ['!'] }; /** * Default options platform schema * * @type {Object} * * @extends {defaultOptions} */ exports.defaultOptions = defaultOptions; const defaultOptionsSchema = _joi.default.object().keys({ id: _joi.default.string().allow(null), adapter: _joi.default.object(), prefix: _joi.default.array() }); exports.defaultOptionsSchema = defaultOptionsSchema;