From 48a576ab5605ec3ec9272809668b8d7ce91c477e Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 8 Mar 2025 17:23:34 -0500 Subject: Put LLM output on text file; Some fixes in logging; New command --- bot/src/commands/settings.js | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'bot/src/commands/settings.js') diff --git a/bot/src/commands/settings.js b/bot/src/commands/settings.js index 88e108d..e5f4ee3 100644 --- a/bot/src/commands/settings.js +++ b/bot/src/commands/settings.js @@ -20,13 +20,14 @@ export default { .addSubcommand(subcommand => subcommand .setName('guild') - .setDescription('Change settings for the guild.')) - .addSubcommand(subcommand => - subcommand - .setName('user') - .setDescription('Change settings for the user.')), + .setDescription('Change settings for the guild.')), + // .addSubcommand(subcommand => + // subcommand + // .setName('user') + // .setDescription('Change settings for the user.')), async execute(interaction) { if (interaction.options.getSubcommand() === 'guild') { + if (!interaction.guild) return await interaction.reply({ content: 'This command can only be run in a guild.' }); //if (!interaction.member.permissions.has(PermissionFlagsBits.ManageGuild)) return await interaction.reply({ content: 'You do not have the permission to manage this guild.', flags: MessageFlags.Ephemeral }); const guildSetting = await guildSettings.findOne({ where: { guildID: interaction.guild.id } }); @@ -126,17 +127,17 @@ export default { }); } - if (interaction.options.getSubcommand() === 'user') { - const userEmbed = new EmbedBuilder() - .setAuthor({ name: 'AleeBot User Settings', iconURL: interaction.client.user.avatarURL() }) - .setDescription('Select the options') - .addFields( - { name: 'Language', value: 'logchannel', inline: true }, - { name: 'Location', value: 'channel', inline: true } - ) - .setColor(abEmbedColour); - - return await interaction.reply({ embeds: [userEmbed] }); - } + // if (interaction.options.getSubcommand() === 'user') { + // const userEmbed = new EmbedBuilder() + // .setAuthor({ name: 'AleeBot User Settings', iconURL: interaction.client.user.avatarURL() }) + // .setDescription('Select the options') + // .addFields( + // { name: 'Language', value: 'logchannel', inline: true }, + // { name: 'Location', value: 'channel', inline: true } + // ) + // .setColor(abEmbedColour); + // + // return await interaction.reply({ embeds: [userEmbed] }); + // } } }; -- cgit v1.2.3