feat: add new thread say command

This commit is contained in:
Shadow 2026-03-03 23:38:37 -06:00
parent ec02c73aa7
commit a43d019d48
No known key found for this signature in database
2 changed files with 16 additions and 0 deletions

View File

@ -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(),

View File

@ -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({