From 6e385204d5470a2c8901b8e059301a98d0f23c52 Mon Sep 17 00:00:00 2001 From: Ladislav Hano <524934@fi.muni.cz> Date: Sat, 25 Feb 2023 13:53:19 +0100 Subject: [PATCH] Rip --- commandBuilder.js | 80 ----------------------------------------------- messageHandler.js | 5 +++ 2 files changed, 5 insertions(+), 80 deletions(-) delete mode 100644 commandBuilder.js diff --git a/commandBuilder.js b/commandBuilder.js deleted file mode 100644 index b5a600a..0000000 --- a/commandBuilder.js +++ /dev/null @@ -1,80 +0,0 @@ -const cubcommand = -{ - name: 'add', - desc: 'Adds new event to the database', - options: [ - { - type: 'str', - name: 'name', - desc: 'Name of the event you want to add', - req: true - } - ] -} - -new SlashCommandBuilder() - .setName('event') - .setDescription('Adds events to celebrate!') - .addSubcommand(subcommand => - subcommand.setName('add') - .setDescription('Adds new event to the database') - .addStringOption(option => option.setName('name') - .setDescription('Name of the event you want to add') - .setRequired(true)) - .addIntegerOption(option => - option.setName('day') - .setDescription('Day of event') - .setRequired(true)) - .addIntegerOption(option => - option.setName('month') - .setDescription('Month of event') - .setRequired(true)) - .addBooleanOption(option => - option.setName('global') - .setDescription('Should this event display on all servers?')) - .addStringOption(option => - option.setName('special-message') - .setDescription('Special message to send in event announcement'))) - .addSubcommand(subcommand => - subcommand.setName('delete') - .setDescription('Deletes event from database') - .addIntegerOption(option => option.setName('id') - .setDescription('Id of the even you want to change') - .setRequired(true))) - .addSubcommandGroup(subcommandGroup => - subcommandGroup.setName('change') - .setDescription('Change the event entry') - .addSubcommand(subcommand => - subcommand.setName('date') - .setDescription('Change date of an event') - .addIntegerOption(option => - option.setName('day') - .setDescription('New event day') - .setRequired(true)) - .addIntegerOption(option => - option.setName('month') - .setDescription('New event month') - .setRequired(true)) - .addIntegerOption(option => option.setName('id') - .setDescription('Id of the even you want to change') - .setRequired(true))) - .addSubcommand(subcommand => - subcommand.setName('name') - .setDescription('Change name of an event') - .addStringOption(option => - option.setName('new-name') - .setDescription('New name of the event') - .setRequired(true)) - .addIntegerOption(option => option.setName('id') - .setDescription('Id of the even you want to change') - .setRequired(true))) - .addSubcommand(subcommand => - subcommand.setName('special-message') - .setDescription('Change special message of an event') - .addStringOption(option => - option.setName('new-message') - .setDescription('New special message') - .setRequired(true)))) - .addSubcommand(subcommand => - subcommand.setName('list') - .setDescription('List all events')), \ No newline at end of file diff --git a/messageHandler.js b/messageHandler.js index 702a433..7f205d1 100644 --- a/messageHandler.js +++ b/messageHandler.js @@ -1,4 +1,5 @@ const moove = require("./moove") +const help = require('./helpFunctions') function gotMessage(message) { if (message.author.bot) { @@ -14,8 +15,12 @@ function gotMessage(message) { * that argument mentions channel */ + console.log(message.reference) + console.log(msgContentSplit.length) + console.log(message) if (message.reference != null && msgContentSplit.length == 1 && message.mentions.channels.first() != undefined) { + console.log("aaaa") moove(message, msgContentSplit[0]) }