diff --git a/src/commands/say.ts b/src/commands/say.ts index a369d07..e56c0ae 100644 --- a/src/commands/say.ts +++ b/src/commands/say.ts @@ -40,6 +40,13 @@ class SayModelCommand extends SayCommand { protected message = "Any discussion about various AI models should be taken to <#1478196963563409520>." } +class SayNewThreadCommand extends SayCommand { + name = "new-thread" + description = "Ask for a new thread when topics change" + protected message = "This thread is getting very long and answers may not be accurate due to the large context. Please start a new thread for any different problems/topics. <@1457407575476801641> please sum up the answer to the initial message and the conversation briefly." + protected useRawContent = true +} + class SayStuckCommand extends SayCommand { name = "stuck" description = "Share the fastest way to get unstuck" @@ -104,6 +111,7 @@ export default class SayRootCommand extends CommandWithSubcommands { contexts = [InteractionContextType.Guild, InteractionContextType.BotDM] subcommands = [ new SayModelCommand(), + new SayNewThreadCommand(), new SayHelpCommand(), new SayUserHelpCommand(), new SayServerFaqCommand(), diff --git a/src/commands/sayCommand.ts b/src/commands/sayCommand.ts index fa584e2..6942b15 100644 --- a/src/commands/sayCommand.ts +++ b/src/commands/sayCommand.ts @@ -14,6 +14,7 @@ export default abstract class SayCommand extends BaseCommand { ApplicationIntegrationType.UserInstall ] contexts = [InteractionContextType.Guild, InteractionContextType.BotDM] + protected useRawContent = false options = [ { name: "user", @@ -30,6 +31,13 @@ export default abstract class SayCommand extends BaseCommand { ? `${this.formatMention(user.id)}${this.lowercaseFirstLetter(this.message)}` : this.message + if (this.useRawContent) { + await interaction.reply({ + content: message + }) + return + } + const container = new Container([new TextDisplay(message)]) await interaction.reply({