Added /topic set command (Part 1, Incomplete)

This commit is contained in:
DJj123dj
2025-09-14 22:04:42 +02:00
parent 415330be21
commit 6ce017b407
5 changed files with 81 additions and 8 deletions
+45
View File
@@ -555,6 +555,32 @@ export const loadAllSlashCommands = async () => {
}
]
}))
//TOPIC
if (allowedCommands.includes("topic")) commands.add(new api.ODSlashCommand("opendiscord:topic",{
type:act.ChatInput,
name:"topic",
description:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
contexts:[discord.InteractionContextType.Guild],
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
options:[
{
name:"set",
description:"Set the topic of the ticket channel to a specific value.", //TODO TRANSLATION!!!
type:acot.Subcommand,
options:[
{
name:"topic",
description:"The new topic of the channel.",
type:acot.String,
required:true
}
]
},
//TODO: list (v4.2)
]
}))
//PRIORITY
if (allowedCommands.includes("priority")) commands.add(new api.ODSlashCommand("opendiscord:priority",{
type:act.ChatInput,
@@ -1093,6 +1119,25 @@ export const loadAllTextCommands = async () => {
}
]
}))
//TOPIC
//TODO: topic list (v4.2)
if (allowedCommands.includes("topic")) commands.add(new api.ODTextCommand("opendiscord:topic-set",{
name:"topic set",
prefix,
dmPermission:false,
guildPermission:true,
allowBots:false,
options:[
{
name:"topic",
type:"string",
required:true,
allowSpaces:true
}
]
}))
//PRIORITY
//TODO: priority list (v4.2)
if (allowedCommands.includes("priority")) commands.add(new api.ODTextCommand("opendiscord:priority-set",{
+16 -8
View File
@@ -207,13 +207,13 @@ export const loadAllHelpMenuComponents = async () => {
const advanced = helpmenu.get("opendiscord:advanced")
if (advanced){
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-global",5,{
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-global",9,{
textName:prefix+"stats global",
textDescription:lang.getTranslation("commands.statsGlobal"),
slashName:"/stats global",
slashDescription:lang.getTranslation("commands.statsGlobal")
}))
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-ticket",4,{
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-ticket",8,{
textName:prefix+"stats ticket",
textDescription:lang.getTranslation("commands.statsTicket"),
slashName:"/stats ticket",
@@ -221,7 +221,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"ticket",optional:false}],
slashOptions:[{name:"ticket",optional:false}]
}))
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-user",2,{
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-user",7,{
textName:prefix+"stats user",
textDescription:lang.getTranslation("commands.statsUser"),
slashName:"/stats user",
@@ -229,7 +229,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"user",optional:false}],
slashOptions:[{name:"user",optional:false}]
}))
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-reset",2,{
if (allowedCommands.includes("stats")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:stats-reset",6,{
textName:prefix+"stats reset",
textDescription:lang.getTranslation("commands.statsReset"),
slashName:"/stats reset",
@@ -237,7 +237,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"reason",optional:true}],
slashOptions:[{name:"reason",optional:true}]
}))
if (allowedCommands.includes("autoclose")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autoclose-disable",1,{
if (allowedCommands.includes("autoclose")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autoclose-disable",5,{
textName:prefix+"autoclose disable",
textDescription:lang.getTranslation("commands.autocloseDisable"),
slashName:"/autoclose disable",
@@ -245,7 +245,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"reason",optional:true}],
slashOptions:[{name:"reason",optional:true}]
}))
if (allowedCommands.includes("autoclose")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autoclose-enable",0,{
if (allowedCommands.includes("autoclose")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autoclose-enable",4,{
textName:prefix+"autoclose enable",
textDescription:lang.getTranslation("commands.autocloseEnable"),
slashName:"/autoclose enable",
@@ -253,7 +253,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"time",optional:false},{name:"reason",optional:true}],
slashOptions:[{name:"time",optional:false},{name:"reason",optional:true}]
}))
if (allowedCommands.includes("autodelete")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autodelete-disable",1,{
if (allowedCommands.includes("autodelete")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autodelete-disable",3,{
textName:prefix+"autodelete disable",
textDescription:lang.getTranslation("commands.autodeleteDisable"),
slashName:"/autodelete disable",
@@ -261,7 +261,7 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"reason",optional:true}],
slashOptions:[{name:"reason",optional:true}]
}))
if (allowedCommands.includes("autodelete")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autodelete-enable",0,{
if (allowedCommands.includes("autodelete")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:autodelete-enable",2,{
textName:prefix+"autodelete enable",
textDescription:lang.getTranslation("commands.autodeleteEnable"),
slashName:"/autodelete enable",
@@ -269,6 +269,14 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"time",optional:false},{name:"reason",optional:true}],
slashOptions:[{name:"time",optional:false},{name:"reason",optional:true}]
}))
if (allowedCommands.includes("topic")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:topic-set",1,{
textName:prefix+"topic set",
textDescription:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
slashName:"/topic set",
slashDescription:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
textOptions:[{name:"topic",optional:false}],
slashOptions:[{name:"topic",optional:false}]
}))
if (allowedCommands.includes("priority")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:priority-set",0,{
textName:prefix+"priority set",
textDescription:"Set the priority of the ticket channel.", //TODO TRANSLATION!!!