v3.3 push 3 (lots of small changes 😄)

This commit is contained in:
DJj123dj
2023-03-13 20:22:23 +01:00
parent ee248e86bc
commit 944032f690
34 changed files with 136 additions and 188 deletions
+4 -3
View File
@@ -48,12 +48,13 @@ exports.serverError = (message) => {
return x
}
/**@param {String[]} list */
exports.invalidIdChooseFromList = (list) => {
/**@param {String[]} list @param {String|undefined} message */
exports.invalidIdChooseFromList = (list,message) => {
const beforemsg = message ? message+"\n\n" : ""
var x = new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.chooseFromListTitle)
.setDescription(l.errors.chooseFromListDescription+"\n`"+list.join("`\n`")+"`")
.setDescription(beforemsg+l.errors.chooseFromListDescription+"\n`"+list.join("`\n`")+"`")
return x
}
+15 -12
View File
@@ -7,7 +7,8 @@ const configParser = require("../utils/configParser")
const act = discord.ApplicationCommandType
const acot = discord.ApplicationCommandOptionType
module.exports = async () => {
/**@param {Boolean|undefined} invisible*/
module.exports = async (invisible) => {
const chalk = (await import("chalk")).default
const sid = config.server_id
@@ -30,17 +31,19 @@ module.exports = async () => {
var readystats = 0
//process.stdout.write("[status] there are "+chalk.blue("0 out of 10")+" commands ready! (this can take up to 40 seconds)")
setInterval(() => {
process.stdout.cursorTo(0)
process.stdout.write("[status] there are "+chalk.blue(readystats+" out of 13")+" commands ready! (this can take up to 40 seconds)")
if (readystats >= 13){
const fs = require("fs")
fs.writeFileSync("./storage/slashcmdEnabled.txt","true")
console.log(chalk.green("\nready!"))
console.log(chalk.blue("you can now start the bot with "+chalk.bgBlue("'npm start'")+"!"))
process.exit(1)
}
},100)
if (!invisible){
setInterval(() => {
process.stdout.cursorTo(0)
process.stdout.write("[status] there are "+chalk.blue(readystats+" out of 13")+" commands ready! (this can take up to 40 seconds)")
if (readystats >= 13){
const fs = require("fs")
fs.writeFileSync("./storage/slashcmdEnabled.txt","true")
console.log(chalk.green("\nready!"))
console.log(chalk.blue("you can now start the bot with "+chalk.bgBlue("'npm start'")+"!"))
process.exit(1)
}
},100)
}
//slashtranslation
const ST = require("../../language/slashcmds/slash.json").data
+2 -1
View File
@@ -14,6 +14,7 @@ const showFlags = async (chalk) => {
if (process.argv.some((v) => v == "--nochecker")) console.log(chalk.blue("[FLAGS] => disabled checker.js")); isFlag = true
if (process.argv.some((v) => v == "--tsoffline")) console.log(chalk.blue("[FLAGS] => offline check for html transcripts disabled!")); isFlag = true
if (process.argv.some((v) => v == "--debug")) console.log(chalk.blue("[FLAGS] => enabled DEBUG mode")); isFlag = true
if (process.argv.some((v) => v == "--noslash")) console.log(chalk.blue("[FLAGS] => slash commands disabled")); isFlag = true
if (!isFlag) console.log(chalk.blue("no flags!"))
}
@@ -48,7 +49,7 @@ exports.headerDataReady = (chalk,status,updatingslash,slashmode) => {
console.log("\n\n"+chalk.red(chalk.underline("STARTING IN SLASH CMD CONFIGURATION MODE!")))
return
}
console.log(chalk.hex("f8ba00")("updating slash cmds: ")+chalk.bold(slashmode))
console.log(chalk.hex("f8ba00")("updating slash cmds: ")+chalk.bold(updatingslash))
}
var languageMSG = ""
+1 -1
View File
@@ -212,7 +212,7 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
const embed = new discord.EmbedBuilder()
.setColor(config.main_color)
.setTitle(":lock: "+l.messages.closedTitle+" :lock:")
.setTitle(":lock: "+l.commands.closeTitle+" :lock:")
.setDescription(l.messages.closedDescription)
channel.send({embeds:[embed],components:[closeButtonRow]})
}
+1
View File
@@ -37,6 +37,7 @@ exports.getDropdown = (ids,placeholder) => {
}else{
if (option.label) selectComponent.setLabel(option.label)
if (option.icon) selectComponent.setEmoji(option.icon)
if (option.description) selectComponent.setDescription(option.description)
}
dropdown.addOptions(selectComponent)
+1 -1
View File
@@ -50,7 +50,7 @@ exports.createEmbed = (id) => {
var description = data.description
if (data.other.enableTicketExplaination){
const chooseCategoryMSG = data.other.customCategoryText.enable ? data.other.customCategoryText.text : l.messages.chooseCategory
const chooseCategoryMSG = data.other.customCategoryText.enable ? data.other.customCategoryText.text : l.messages.chooseATicket
description = description+"\n\n__"+chooseCategoryMSG+"__\n"
var ticketExplainations = []