UNPKG

n8n-nodes-discord

Version:

nodes to trigger workflows from Discord or send interactive messages. Uses the components API which allows to create dialogs (e.g. attach buttons and wait for the user to click on them)

25 lines 830 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const discord_js_1 = require("discord.js"); const name = 'clean'; exports.default = { params: { autoRemove: true, }, registerCommand: () => { return new discord_js_1.SlashCommandBuilder() .setName(name) .setDescription('Delete messages') .addStringOption((option) => option .setName('input') .setDescription('Number of last messages to delete') .setRequired(false)); }, executeCommand: (param, interaction) => { const channel = interaction.channel; const nb = parseInt(param) > 1 && parseInt(param) < 100 ? parseInt(param) : 100; channel.bulkDelete(nb); return 'Done!'; }, }; //# sourceMappingURL=clean.js.map