diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/Commands/Tickets/renameTicket.js b/Commands/Tickets/renameTicket.js new file mode 100644 index 0000000..8fc6b56 --- /dev/null +++ b/Commands/Tickets/renameTicket.js @@ -0,0 +1,70 @@ +// SupportBot | Emerald Services +// Info Command + +const fs = require("fs"); + +const { + EmbedBuilder, + ApplicationCommandOptionType, + ApplicationCommandType, + ChannelType, + ActionRowBuilder, + ButtonBuilder, + StringSelectMenuBuilder, + StringSelectMenuOptionBuilder, + ButtonStyle, + MessageCollector, + MessageFlags, + ModalBuilder, + TextInputBuilder, + TextInputStyle, + SeparatorBuilder, + ContainerBuilder, + TextDisplayBuilder +} = require("discord.js"); + +const yaml = require("js-yaml"); + +const supportbot = yaml.load( + fs.readFileSync("./Configs/supportbot.yml", "utf8") +); + +const cmdconfig = yaml.load( + fs.readFileSync("./Configs/commands.yml", "utf8") +); + +const msgconfig = yaml.load( + fs.readFileSync("./Configs/messages.yml", "utf8") +); + +const Command = require("../../Structures/Command.js"); + +module.exports = new Command({ + name: cmdconfig.TicketRename.Command, + description: cmdconfig.TicketRename.Description, + options: [], + permissions: cmdconfig.TicketRename.Permission, + + async run(interaction) { + let disableCommand = true; + + const subcommand = interaction.options.getSubcommand(false); + + if (subcommand === cmdconfig.TicketRename.Command) { + const modal = new ModalBuilder() + .setCustomId("renameTicketModal") + .setTitle("Rename Channel") + new ActionRowBuilder().addComponents( + new TextInputBuilder() + .setCustomId("renameTicket") + .setLabel("New Channel Name") + .setStyle(TextInputStyle.Short) + .setRequired(true) + ); + + return interaction.showModal(modal); + + } + + }, +}); \ No newline at end of file diff --git a/Configs/commands.yml b/Configs/commands.yml index 58506f1..2497433 100644 --- a/Configs/commands.yml +++ b/Configs/commands.yml @@ -37,12 +37,21 @@ Profile: Permission: ["SendMessages"] # Command is automatically disabled when the TicketClaims is disabled. + + OpenTicket: Command: "ticket" Description: "Create a support ticket." Permission: ["SendMessages"] Enabled: true +TicketRename: + Command: "rename" + Description: "Rename a support ticket." + Permission: ["SendMessages"] + Enabled: true + + AddUser: Command: "add" Description: "Add a user to a support ticket."