Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions open-ticket/ot-ticket-forms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ The `questions` array defines the form's questions. Each question object include
5. A form does not have a question limit. But try to make it as shorter as you can so the user can answer in a short time.
6. You can add as many forms as you want.
7. The forms will be sent automatically when a user creates a ticket from which the option id is on the `autoSendOptionIds` field.
8. You can also send a form using the slash command `/form send <form> <channel>`.
8. You can also send a form using the slash command `/form send <form> <channel>`. This command allows sending the form to a text channel or a thread.

By following this structure, you can create robust and flexible forms with the OT plugin.
By following this structure, you can create robust and flexible forms with the OT plugin.
10 changes: 5 additions & 5 deletions open-ticket/ot-ticket-forms/builders/commandBuilders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ opendiscord.events.get("onSlashCommandLoad").listen((slash) => {
config.data.forEach((form) => {
formChoices.push({name:form.name,value:form.id})
})

slash.add(new api.ODSlashCommand("ot-ticket-forms:form",{
name:"form",
description:"Send a form.",
Expand All @@ -23,7 +23,7 @@ opendiscord.events.get("onSlashCommandLoad").listen((slash) => {
{
type:acot.Subcommand,
name:"send",
description:"Send a form to a channel.",
description:"Send a form to a channel or thread.",
options:[
{
type:acot.String,
Expand All @@ -35,9 +35,9 @@ opendiscord.events.get("onSlashCommandLoad").listen((slash) => {
{
type:acot.Channel,
name:"channel",
description:"The channel to send the form.",
description:"The channel or thread to send the form.",
required:true,
channelTypes:[discord.ChannelType.GuildText,discord.ChannelType.GuildAnnouncement]
channelTypes:[discord.ChannelType.GuildText,discord.ChannelType.GuildAnnouncement, discord.ChannelType.PublicThread, discord.ChannelType.PrivateThread]
}
]
}
Expand All @@ -58,4 +58,4 @@ opendiscord.events.get("onSlashCommandLoad").listen((slash) => {
})) return true
else return false
}))
})
})