3.0 update!

This commit is contained in:
DJj123dj
2022-10-07 16:32:29 +02:00
parent bfc02611c7
commit 95bc1f4fbf
19 changed files with 217 additions and 168 deletions
@@ -21,7 +21,7 @@ exports.closeVerifyBar = new arb()
.setDisabled(false)
.setStyle(bs.Primary)
.setEmoji("💬")
.setLabel("close with reason")
.setLabel(l.buttons.closeWithReason)
)
.addComponents(
new button()
@@ -22,14 +22,14 @@ const tib = discord.TextInputBuilder
module.exports = () => {
//theModal
const reasonModal = new modal()
.setTitle("close with reason")
.setTitle(l.buttons.closeWithReason)
.setCustomId("OTCloseReasonModal")
const reasonInput = new arb()
.addComponents([
new tib()
.setCustomId('OTreasonInput')
.setLabel("What is the reason for closing this ticket?")
.setLabel(l.messages.modalreason)
.setStyle(tis.Short)
.setMaxLength(100)
.setRequired(true)
+13 -1
View File
@@ -40,10 +40,14 @@ module.exports = async () => {
}
},100)
//slashtranslation
const ST = require("../../language/slashcmds/slash.json").data
//create a ticket (/new or /ticket)
client.application.commands.create({
name:"ticket",
description:"Create a ticket!",
descriptionLocalizations:ST.newticket,
defaultPermission:true,
type:act.ChatInput,
options:[
@@ -53,7 +57,6 @@ module.exports = async () => {
description:"The type of ticket.",
required:true,
choices:choices
}
]
},sid).then(() => {
@@ -65,6 +68,7 @@ module.exports = async () => {
description:"Create a ticket!",
defaultPermission:true,
type:act.ChatInput,
descriptionLocalizations:ST.newticket,
options:[
{
type:acot.String,
@@ -84,6 +88,7 @@ module.exports = async () => {
name:"help",
description:"View the available commands.",
defaultPermission:true,
descriptionLocalizations:ST.help,
type:act.ChatInput
},sid).then(() => {
readystats++
@@ -95,6 +100,7 @@ module.exports = async () => {
name:"close",
description:"Close the current ticket.",
defaultPermission:true,
descriptionLocalizations:ST.close,
type:act.ChatInput,
options:[{
name:"reason",
@@ -112,6 +118,7 @@ module.exports = async () => {
name:"delete",
description:"Delete the current ticket.",
defaultPermission:true,
descriptionLocalizations:ST.delete,
type:act.ChatInput
},sid).then(() => {
readystats++
@@ -122,6 +129,7 @@ module.exports = async () => {
name:"message",
description:"Create a ticket message.",
defaultPermission:true,
descriptionLocalizations:ST.message,
type:act.ChatInput,
options:[
{
@@ -143,6 +151,7 @@ module.exports = async () => {
name:"add",
description:"Add people to this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.add,
type:act.ChatInput,
options:[
{
@@ -161,6 +170,7 @@ module.exports = async () => {
name:"remove",
description:"Remove people from this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.remove,
type:act.ChatInput,
options:[
{
@@ -179,6 +189,7 @@ module.exports = async () => {
name:"rename",
description:"Rename this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.rename,
type:act.ChatInput,
options:[
{
@@ -197,6 +208,7 @@ module.exports = async () => {
name:"reopen",
description:"Reopen this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.reopen,
type:act.ChatInput
},sid).then(() => {
readystats++
+1 -1
View File
@@ -296,7 +296,7 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
if (enableTranscript == true && mode != "deletenotranscript"){
const transcriptReason = (mode == "close") ? "**"+l.messages.reason+":** "+newReason : "**"+l.messages.reason+":** "+l.messages.none
const closedByPrefix = (mode.startsWith("delete")) ? "deleted by" : "closed by"
const closedByPrefix = (mode.startsWith("delete")) ? l.messages.deletedby : l.messages.closedby
if (config.system.enable_transcript || config.system.enable_DM_transcript){
var fileattachment = await require("../transcript").createTranscript(channelmessages,channel)
+1 -1
View File
@@ -50,7 +50,7 @@ exports.createTranscript = async (messagecollection,channel) => {
try {
const cd = new Date()
const months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getSeconds()+":"+cd.getMinutes()+":"+cd.getHours()
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getHours()+":"+cd.getMinutes()+":"+cd.getSeconds()
const filearray = ["open ticket transcript:\ntranscript creation: "+dateString+"\nticket name: "+ticketuserdata.ticketname+"\nticket opener: "+ticketuserdata.ticketopener.name,"\nTRANSCRIPT START:"]
messagecollection.reverse()
+2 -2
View File
@@ -15,11 +15,11 @@ exports.getDropdown = (ids) => {
.setDisabled(false)
.setMaxValues(1)
.setMinValues(1)
.setPlaceholder("Choose a ticket")
.setPlaceholder(l.messages.chooseATicket)
.addOptions(
new discord.SelectMenuOptionBuilder()
.setDefault(true)
.setLabel("Choose a ticket")
.setLabel(l.messages.chooseATicket)
.setValue("OTChooseTicket")
)