From 657599acccf351c7c9366cec9f648b7496c89bdb Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 1 Apr 2025 21:52:44 -0400 Subject: New commands (warn, adventure); Splitting log channels --- bot/src/commands/adventure.js | 12 ++++++++++++ bot/src/commands/settings.js | 24 +++++++++++++++++++----- bot/src/commands/warn.js | 12 ++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 bot/src/commands/adventure.js create mode 100644 bot/src/commands/warn.js (limited to 'bot/src/commands') diff --git a/bot/src/commands/adventure.js b/bot/src/commands/adventure.js new file mode 100644 index 0000000..0565478 --- /dev/null +++ b/bot/src/commands/adventure.js @@ -0,0 +1,12 @@ +// The plan for this command is that the user can select a story, then the bot sends the story that the user selected, and it will be interactive +// so it will be like an adventure story, and it will have multiple paths that the user can select. +import { SlashCommandBuilder } from 'discord.js'; + +export default { + data: new SlashCommandBuilder() + .setName('adventure') + .setDescription('Select an interactive story'), + async execute(interaction) { + return await interaction.reply('Hello world'); + } +}; diff --git a/bot/src/commands/settings.js b/bot/src/commands/settings.js index 36fe4d9..872bbd7 100644 --- a/bot/src/commands/settings.js +++ b/bot/src/commands/settings.js @@ -13,8 +13,16 @@ export default { .setDescription('Sets the settings for this guild.') .addChannelOption(option => option - .setName('log') - .setDescription('Log channel.')) + .setName('memberlog') + .setDescription('Member Log channel.')) + .addChannelOption(option => + option + .setName('messagelog') + .setDescription('Message Log channel.')) + .addChannelOption(option => + option + .setName('warnlog') + .setDescription('Warn Log channel.')) .addChannelOption(option => option .setName('suggestion') @@ -45,7 +53,9 @@ export default { if (interaction.options.getSubcommand() === 'clear') { await guildSettings.update({ - logChannelID: null, + memberLogChannelID: null, + messageLogChannelID: null, + warnLogChannelID: null, suggestionsChannelID: null, qotdChannelID: null, qotdToggle: null, @@ -62,7 +72,9 @@ export default { // Handle clearing settings if (areAllSettingsEmpty(interaction)) { guildEmbed.addFields( - { name: 'Logging', value: guildSetting?.logChannelID ? `<#${guildSetting.logChannelID}>` : 'N/A', inline: true }, + { name: 'Member Log', value: guildSetting?.memberLogChannelID ? `<#${guildSetting.memberLogChannelID}>` : 'N/A', inline: true }, + { name: 'Message Log', value: guildSetting?.messageLogChannelID ? `<#${guildSetting.messageLogChannelID}>` : 'N/A', inline: true }, + { name: 'Warn Log', value: guildSetting?.warnLogChannelID ? `<#${guildSetting.warnLogChannelID}>` : 'N/A', inline: true }, { name: 'Suggestions', value: guildSetting?.suggestionsChannelID ? `<#${guildSetting.suggestionsChannelID}>` : 'N/A', inline: true }, { name: 'QOTD Channel', value: guildSetting?.qotdChannelID ? `<#${guildSetting.qotdChannelID}>` : 'N/A', inline: true }, { name: 'LLM Chatbot', value: guildSetting?.ollamaEnabled ? 'Enabled' : 'Disabled', inline: true }, @@ -73,7 +85,9 @@ export default { // Process each setting type guildEmbed.setDescription('Updated this setting.'); - await updateChannelSetting(interaction, guildEmbed, 'log', 'logChannelID', 'Logging'); + await updateChannelSetting(interaction, guildEmbed, 'memberlog', 'memberLogChannelID', 'Member Log'); + await updateChannelSetting(interaction, guildEmbed, 'messagelog', 'messageLogChannelID', 'Message Log'); + await updateChannelSetting(interaction, guildEmbed, 'warnlog', 'warnLogChannelID', 'Warn Log'); await updateChannelSetting(interaction, guildEmbed, 'suggestion', 'suggestionsChannelID', 'Suggestions'); await updateChannelSetting(interaction, guildEmbed, 'qotd', 'qotdChannelID', 'QOTD Channel'); await updateBooleanSetting(interaction, guildEmbed, 'qotdtoggle', 'qotdToggle', 'Quote of the Day'); diff --git a/bot/src/commands/warn.js b/bot/src/commands/warn.js new file mode 100644 index 0000000..a053c12 --- /dev/null +++ b/bot/src/commands/warn.js @@ -0,0 +1,12 @@ +import { PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; + +export default { + data: new SlashCommandBuilder() + .setName('warn') + .setDescription('Warns a member of the server') + .setContexts(0) + .setDefaultMemberPermissions(PermissionFlagsBits.KickMembers), + async execute(interaction) { + return await interaction.reply('Hello world'); + } +}; -- cgit v1.2.3