UNPKG

@fantinodavide/discord-html-transcripts

Version:

A nicely formatted html transcript generator for discord.js.

27 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComponentV2Type = exports.ExportReturnType = void 0; exports.isComponentsV2Message = isComponentsV2Message; const discord_js_1 = require("discord.js"); var ExportReturnType; (function (ExportReturnType) { ExportReturnType["Buffer"] = "buffer"; ExportReturnType["String"] = "string"; ExportReturnType["Attachment"] = "attachment"; })(ExportReturnType || (exports.ExportReturnType = ExportReturnType = {})); // Discord Components V2 types var ComponentV2Type; (function (ComponentV2Type) { ComponentV2Type[ComponentV2Type["Section"] = 11] = "Section"; ComponentV2Type[ComponentV2Type["Container"] = 12] = "Container"; ComponentV2Type[ComponentV2Type["Separator"] = 13] = "Separator"; ComponentV2Type[ComponentV2Type["TextDisplay"] = 14] = "TextDisplay"; ComponentV2Type[ComponentV2Type["Thumbnail"] = 15] = "Thumbnail"; ComponentV2Type[ComponentV2Type["MediaGallery"] = 16] = "MediaGallery"; })(ComponentV2Type || (exports.ComponentV2Type = ComponentV2Type = {})); // Utility function to check if a message uses Components V2 function isComponentsV2Message(message) { var _a; return Boolean((_a = message.flags) === null || _a === void 0 ? void 0 : _a.has(discord_js_1.MessageFlags.IsComponentsV2)); } //# sourceMappingURL=types.js.map