From 11bb9ab6b30314d91209bc9888d95783cc247e98 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 3 Mar 2025 18:57:06 -0500 Subject: Added back "addquote"; ollama integration; Cleaned up bot.js --- bot/src/commands/settings.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'bot/src/commands/settings.js') diff --git a/bot/src/commands/settings.js b/bot/src/commands/settings.js index a04d1c2..5d32a67 100644 --- a/bot/src/commands/settings.js +++ b/bot/src/commands/settings.js @@ -1,10 +1,26 @@ -import { SlashCommandBuilder } from 'discord.js'; +import { MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; export default { data: new SlashCommandBuilder() .setName('settings') - .setDescription('User settings for AleeBot.'), + .setDescription('User settings for AleeBot.') + .addSubcommand(subcommand => + subcommand + .setName('guild') + .setDescription('Change settings for the guild.')) + .addSubcommand(subcommand => + subcommand + .setName('user') + .setDescription('Change settings for the user.')), async execute(interaction) { - return await interaction.reply(`**PONG!** :ping_pong: ${Math.round(interaction.client.ws.ping)} ms`); + if (interaction.options.getSubcommand() === '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 }); + + return await interaction.reply('recieved'); + } + + if (interaction.options.getSubcommand() === 'user') { + return; + } } }; -- cgit v1.2.3