From 6fe761ffafaf1f4aec489ccb0172944d6f734e26 Mon Sep 17 00:00:00 2001 From: Bradley Bickford Date: Tue, 24 Jun 2025 22:19:06 -0400 Subject: [PATCH] Adding breadthread framing and fixing something about breadalert --- src/commands/breadalert.ts | 2 +- src/commands/breadthread.ts | 40 +++++++++++++++++++++++++++++++++++++ src/commands/index.ts | 4 +++- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/commands/breadthread.ts diff --git a/src/commands/breadalert.ts b/src/commands/breadalert.ts index 4238811..0a19372 100644 --- a/src/commands/breadalert.ts +++ b/src/commands/breadalert.ts @@ -9,7 +9,7 @@ export const data = new SlashCommandBuilder() subcommand .setName("list") .setDescription("List the current Bread Alert active alerts") - .addNumberOption(option => + .addIntegerOption(option => option .setName("count") .setDescription("The number of future alerts to return, default 5") diff --git a/src/commands/breadthread.ts b/src/commands/breadthread.ts new file mode 100644 index 0000000..516fc7b --- /dev/null +++ b/src/commands/breadthread.ts @@ -0,0 +1,40 @@ +import { ChannelType, CommandInteraction, SlashCommandBuilder } from "discord.js"; + +export const enabled: boolean = true + +export const data = new SlashCommandBuilder() + .setName("breadthread") + .setDescription("Manages Breadbot's extended thread features") + .addSubcommand(subcommand => + subcommand + .setName("autolock") + .setDescription("Enables auto locking of a thread after a period of thread inactivity") + .addChannelOption(option => + option + .setName("channel") + .setDescription("The name of the thread you want to autolock") + .addChannelTypes( + ChannelType.PublicThread, + ChannelType.PrivateThread, + ChannelType.AnnouncementThread + ) + .setRequired(true) + ) + .addBooleanOption(option => + option + .setName("enable") + .setDescription("Enable or disable the auto locking") + .setRequired(true) + ) + .addStringOption(option => + option + .setName("timeinactive") + .setDescription("How long the thread needs to be inactive before locking, default is 3 days") + .setRequired(false) + ) + + ) + +export async function execute(interaction: CommandInteraction) { + return interaction.reply("NOT IMPLEMENTED!") +} \ No newline at end of file diff --git a/src/commands/index.ts b/src/commands/index.ts index 03ea096..609f6e6 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,7 +1,9 @@ import * as ping from "./ping"; import * as breadalert from "./breadalert" +import * as breadthread from "./breadthread" export const commands = { ping, - breadalert + breadalert, + breadthread } \ No newline at end of file