Open Ticket v3.2.2

new update :)
This commit is contained in:
Jasper
2023-02-24 21:58:40 +01:00
committed by GitHub
18 changed files with 340 additions and 138 deletions
+8 -6
View File
@@ -1,11 +1,11 @@
node_modules/
package-lock.json
devConfig.json
devConfig1.json
devConfig2.json
devConfig3.json
devConfig4.json
devConfig5.json
devconfig.json
devconfig1.json
devconfig2.json
devconfig3.json
devconfig4.json
devconfig5.json
.DS_Store
openticketdebug.txt
developerChangelog.md
@@ -18,3 +18,5 @@ storage/.DS_Store
livestatus.json
test.js
devtsconfig.json
plugins/*
!plugins/example.plugin.js
+5 -3
View File
@@ -13,7 +13,7 @@ Take a look at all the features and discover the possibilities!
## Features
- **🎉 NEW! html transcripts!**
- 🔒 close, ❌ delete & ✅ re-open tickets
- 🇬🇧 translation in 11 different languages
- 🇬🇧 translation in 12 different languages
- 📄 very advanced customisation
- 🆗 buttons or 🔽 dropdowns!
- 🆒 plugins
@@ -33,7 +33,8 @@ Take a look at all the features and discover the possibilities!
</details>
## preview
Images coming soon
Images coming soon<br>
You can already see some images at our [documentation!](https://docs.openticket.dj-dj.be)
## credits
@@ -54,7 +55,8 @@ Translators
|Czech |t0miiis#3022 |
|Arabic |ChilledBroke#9986 & M4#5882|
|Danish |the_gamer#5095 |
|Portuguese |*unknown* |
|Portuguese |QuirAddon#9778 |
|Russian |Apexo#0723 |
## links
current version: _v3.2.2_
+9 -3
View File
@@ -18,14 +18,16 @@
"enable_DM_Messages":true,
"has@everyoneaccess":false,
"member_role":"member role (doesn't have access to tickets)",
"closeMode":"adminonly|normal",
"member_role":"member role (this role doesn't have access to tickets)",
"closeMode":"adminonly or normal (select one of the 2)",
"transcripts":"!!!! ALL SETTINGS FOR TRANSCRIPTS ARE LOCATED IN: transcriptconfig.json !!!!",
"showSlashcmdsInHelp":false
"showSlashcmdsInHelp":false,
"answerInEphemeralOnOpen":true
},
"SUPPORT":"Take look at our wiki: https://docs.openticket.dj-dj.be or join our discord server: https://discord.dj-dj.be if you need support!",
"options":[
{
"id":"general",
@@ -47,6 +49,10 @@
"enable":false,
"url":"https://www.example.com/catmemes/cat.png"
},
"image":{
"enable":false,
"url":"https://www.dj-dj.be/wp-content/uploads/2022/09/pfp-cropped.png"
},
"closedCategory":{
"enable":false,
+1 -1
View File
@@ -33,5 +33,5 @@ module.exports = () => {
}
})
log("info","loaded plugins",[{key:"success",value:successcount},{key:"error",value:failcount},{key:"total",value:totalcount}])
require("../startscreen").headerDataPlugins({total:totalcount,success:successcount,error:failcount})
}
+11 -2
View File
@@ -5,7 +5,7 @@ exports.checker = async () => {
if (process.argv.some((v) => v == "--devconfig")){
//console.log(chalk.blue("=> used dev config instead of normal config"))
try{
var tempconfig = require("../devConfig.json")
var tempconfig = require("../devconfig.json")
}catch(err){console.log(err);var tempconfig = require("../config.json")}
}else{
var tempconfig = require("../config.json")
@@ -237,6 +237,14 @@ exports.checker = async () => {
createError("'"+path+"/thumbnail' | there is no thumbnail object!")
}
//image
if (option.image){
checkType(option.image.enable,"boolean",path+"/image/enable")
checkType(option.image.url,"string",path+"/image/url")
}else{
createError("'"+path+"/image' | there is no image object!")
}
//closedCategory
if (option.closedCategory){
checkType(option.closedCategory.enable,"boolean",path/"/closedCategory/enable")
@@ -404,7 +412,7 @@ exports.checker = async () => {
checkType(config.languagefile,"string","languagefile")
const lf = config.languagefile
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian") && !lf.startsWith("czech") && !lf.startsWith("danish")){
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian") && !lf.startsWith("czech") && !lf.startsWith("danish") && !lf.startsWith("russian")){
createError("'languagefile' | invalid language, more info in the wiki")
}
@@ -453,6 +461,7 @@ exports.checker = async () => {
}
checkType(config.system.showSlashcmdsInHelp,"boolean","system/showSlashcmdsInHelp")
checkType(config.system.answerInEphemeralOnOpen,"boolean","system/answerInEphemeralOnOpen")
//options
+6 -15
View File
@@ -1,34 +1,25 @@
const index = require("../index")
if (index.developerConfig){
var config = require("../devConfig.json")
var config = require("../devconfig.json")
}else{var config = require("../config.json")}
var localLanguage = require("../language/english.json")
if (config.languagefile.startsWith("custom")) localLanguage = require("../language/custom.json")
else if (config.languagefile.startsWith("dutch")) localLanguage = require("../language/dutch.json")
else if (config.languagefile.startsWith("english")) localLanguage = require("../language/english.json")
else if (config.languagefile.startsWith("german")) localLanguage = require("../language/german.json")
else if (config.languagefile.startsWith("french")) localLanguage = require("../language/french.json")
else if (config.languagefile.startsWith("romanian")) localLanguage = require("../language/romanian.json")
else if (config.languagefile.startsWith("arabic")) localLanguage = require("../language/arabic.json")
else if (config.languagefile.startsWith("spanish")) localLanguage = require("../language/spanish.json")
else if (config.languagefile.startsWith("portuguese")) localLanguage = require("../language/portuguese.json")
else if (config.languagefile.startsWith("italian")) localLanguage = require("../language/italian.json")
else if (config.languagefile.startsWith("danish")) localLanguage = require("../language/danish.json")
const fs = require("fs")
const lfexists = fs.existsSync("./language/"+config.languagefile+".json")
if (lfexists) localLanguage = require("../language/"+config.languagefile+".json")
const errorLog = async () => {
const chalk = await (await import("chalk")).default
console.log(chalk.red("Something went wrong when loading the language!")+"\nCheck the config file or create a ticket in our server!")
require("./startscreen").headerDataLanguage("Something went wrong when loading the language!",true)
}
const successLog = async (language) => {
const chalk = await (await import("chalk")).default
console.log(chalk.green("loaded language "+language+"..."))
require("./startscreen").headerDataLanguage("sucessfully loaded language "+language,false)
}
if (!localLanguage){
+7
View File
@@ -0,0 +1,7 @@
██████╗ ██████╗ ███████╗███╗ ██╗ ████████╗██╗ ██████╗██╗ ██╗███████╗████████╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ╚══██╔══╝██║██╔════╝██║ ██╔╝██╔════╝╚══██╔══╝
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ ██║██║ █████╔╝ █████╗ ██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██╔══╝ ██║
╚██████╔╝██║ ███████╗██║ ╚████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝
-1
View File
@@ -8,7 +8,6 @@ const act = discord.ApplicationCommandType
const acot = discord.ApplicationCommandOptionType
module.exports = async () => {
bot.errorLog.log("info","auto-updating slash commands...")
const sid = config.server_id
const ids = configParser.getTicketValuesArray("id")
+75
View File
@@ -0,0 +1,75 @@
const discord = require('discord.js')
const bot = require('../index')
const client = bot.client
const config = bot.config
const l = bot.language
const log = bot.errorLog.log
const logo = require("fs").readFileSync("./core/logo.txt").toString()
/**@param {import('chalk').ChalkInstance} chalk */
const showFlags = async (chalk) => {
var isFlag = false
if (process.argv.some((v) => v == "--devconfig")) console.log(chalk.blue("[FLAGS] => used dev config instead of normal config")); isFlag = true
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 (!isFlag) console.log(chalk.blue("no flags!"))
}
exports.run = async () => {
const chalk = await (await import("chalk")).default
console.log(chalk.hex("f8ba00")(logo))
const version = require("../package.json").version
var headertext = "v"+version+" - Support: https://discord.dj-dj.be - Language: "+config.languagefile
const spaceamount = (84-headertext.length)/2
var i = 0
while (i < spaceamount){
headertext = " "+headertext
i++
}
console.log(chalk.bold(headertext+"\n"))
console.log(chalk.bold(chalk.underline("FLAGS:")))
showFlags(chalk)
}
/**
* @param {import('chalk').ChalkInstance} chalk
* @param {{type:String,text:String,enabled:Boolean}} status
* @param {Boolean} updatingslash
* @param {Boolean} slashmode
*
*/
exports.headerDataReady = (chalk,status,updatingslash,slashmode) => {
console.log("\n"+chalk.bold(chalk.underline("STARTUP INFO:")))
if (status.enabled) console.log(chalk.hex("f8ba00")("status: ")+chalk.bold(status.type.toLowerCase())+" "+status.text)
if (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))
}
var languageMSG = ""
var languageErr = false
/**
* @param {String} message
* @param {Boolean} err
*/
exports.headerDataLanguage = async (message,err) => {
languageMSG = message
languageErr = err
}
/**
* @param {{total:Number,error:Number,success:Number}} plugins
*/
exports.headerDataPlugins = async (plugins) => {
const chalk = await (await import("chalk")).default
const lmsg = languageErr ? chalk.red(languageMSG) : languageMSG
console.log(chalk.hex("f8ba00")("language: ")+lmsg)
console.log(chalk.hex("f8ba00")("plugins loaded: ")+chalk.bold(plugins.total+" total ")+"("+plugins.success+"✅ "+plugins.error+"❌)")
console.log("\n"+chalk.bold(chalk.underline("LOGS:")))
}
+26 -1
View File
@@ -239,12 +239,37 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
}
/**
*
* @param {discord.TextChannel} channel
* @param {Number} limit
* @returns
*/
const getmessages = async (channel,limit) => {
const final = []
var lastId = ""
while (true) {
const options = {limit:100}
if (lastId) options.before = lastId
const messages = await channel.messages.fetch(options)
messages.forEach(msg => {final.push(msg)})
lastId = messages.last().id
if (messages.size != 100 || final >= limit) {
break
}
}
return final
}
const transcriptHandler = async () => {
if (!bot.tsconfig.sendTranscripts.enableChannel && !bot.tsconfig.sendTranscripts.enableDM) return false
const APIEvents = require("../api/modules/events")
const messages = await channel.messages.fetch({cache:true})
const messages = await getmessages(channel,5000)
await require("../transcriptSystem/manager")(messages,guild,channel,user,reason)
APIEvents.onTranscriptCreation(messages,channel,guild,new Date())
}
+21 -10
View File
@@ -53,10 +53,10 @@ module.exports = () => {
if (interaction.isButton()){
try {
interaction.deferUpdate()
if (config.system.answerInEphemeralOnOpen) interaction.deferReply({ephemeral:true})
} catch{}
}else if (interaction.isChatInputCommand()){
interaction.reply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)]})
interaction.deferReply({ephemeral:config.system.answerInEphemeralOnOpen})
}else if (interaction.isStringSelectMenu()){
try {
interaction.deferUpdate()
@@ -65,14 +65,6 @@ module.exports = () => {
if (storage.get("ticketStorage",interaction.member.id) == null || storage.get("ticketStorage",interaction.member.id) == "false"|| Number(storage.get("ticketStorage",interaction.member.id)) < config.system.max_allowed_tickets){
try{
if (currentTicketOptions.enableDmOnOpen){
interaction.member.send({embeds:[bot.errorLog.custom(l.messages.newTicketDmTitle,currentTicketOptions.message,":ticket:",config.main_color)]})
}
}
catch{log("system","can't send DM to member, member doesn't allow dm's")}
//update storage
storage.set("ticketStorage",interaction.member.id,Number(storage.get("ticketStorage",interaction.member.id))+1)
var ticketNumber = interaction.member.user.username
@@ -193,6 +185,7 @@ module.exports = () => {
}
if (currentTicketOptions.thumbnail.enable) ticketEmbed.setThumbnail(currentTicketOptions.thumbnail.url)
if (currentTicketOptions.image.enable) ticketEmbed.setImage(currentTicketOptions.image.url)
ticketChannel.send({
content:"<@"+interaction.member.id+"> @here",
@@ -205,6 +198,24 @@ module.exports = () => {
log("system","created new ticket",[{key:"ticket",value:ticketName},{key:"user",value:interaction.user.tag}])
require("../api/modules/events").onTicketOpen(interaction.user,ticketChannel,interaction.guild,new Date(),{name:ticketName,status:"open",ticketOptions:currentTicketOptions})
const channelbutton = new discord.ActionRowBuilder()
.addComponents([
new discord.ButtonBuilder()
.setStyle(discord.ButtonStyle.Link)
.setDisabled(false)
.setEmoji("🎫")
.setLabel("go to ticket")
.setURL(ticketChannel.url)
])
try{
if (currentTicketOptions.enableDmOnOpen) interaction.member.send({embeds:[bot.errorLog.custom(l.messages.newTicketDmTitle,currentTicketOptions.message,":ticket:",config.main_color)],components:[channelbutton]})
}
catch{log("system","failed to send DM")}
if ((interaction.isButton() && config.system.answerInEphemeralOnOpen) || interaction.isChatInputCommand()) interaction.editReply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)],components:[channelbutton]})
})
}else{
try {
+1 -1
View File
@@ -119,7 +119,7 @@ module.exports = async (messages,guild,channel,user,reason) => {
if (!user) return
const embed = tsembeds.tsready(chName,chId,url,user)
try {
user.send({embeds:[embed]})
ticketopener.send({embeds:[embed]})
}catch{}
}
},duration)
+5 -4
View File
@@ -6,7 +6,7 @@ const l = bot.language
//==================
//OTTicketOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}}} OTTicketOptions */
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}}} OTTicketOptions */
//OTRoleOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",enableDmOnOpen:Boolean}} OTRoleOptions */
@@ -18,8 +18,11 @@ const l = bot.language
//OTConfigMessage
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableThumbnail: boolean, thumbnail: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/
//OTAllOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}}} OTAllOptions */
//StringOptions
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"closedCategory"} OTTicketStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"image"|"closedCategory"} OTTicketStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"roles"|"mode"|"enableDmOnOpen"} OTRoleStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"url"} OTWebsiteStringOptions */
@@ -168,8 +171,6 @@ this.websiteType = {}
this.messageType = {}
//OTAllOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}}} OTAllOptions */
/**
*
+52 -78
View File
@@ -1,13 +1,46 @@
// __________ __________ ___________ ____ ____
// / ____ \ / ______ \ / | | \ | |
// | / \ | | | | | | |_______| | \ | |
// | | | | | |____| | | | | |\ \ | |
// | | | | | ________/ | |______ | | \ \ | |
// | | | | | | | _____| | | \ \ | |
// | | | | | | | | | | \ \ | |
// | | | | | | | |________ | | \ \| |
// | \____/ | | | | | | | \ |
// \__________/ |__| \__________| |__| \___|
/**
____ _____ ______ _ _ _______ _____ _____ _ ________ _______
/ __ \| __ \| ____| \ | | |__ __|_ _/ ____| |/ / ____|__ __|
| | | | |__) | |__ | \| | | | | || | | ' /| |__ | |
| | | | ___/| __| | . ` | | | | || | | < | __| | |
| |__| | | | |____| |\ | | | _| || |____| . \| |____ | |
\____/|_| |______|_| \_| |_| |_____\_____|_|\_\______| |_|
Hey! we are looking for you!
Do you speak a language that isn't yet in our /languages directory
or do you speak one that isn't up-to-date? Open Ticket needs
translators for lots of different languages!
Feel free to join our translator team and help us improve Open Ticket!
SUGGESTING NEW FEATURES:
=====================
Open Ticket is a community project. This means that
almost all feature ideas come from our community.
Are you missing something you want in open ticket?
Then join our Discord server and we will add it (if possible)
Did you know that 80% of all features in OT were ideas from our community?
INFORMATION:
============
Open Ticket v3.2.2 - © DJdj Development
discord: https://discord.dj-dj.be
website: https://www.dj-dj.be
github: https://openticket.dj-dj.be
support e-mail: support@dj-dj.be
Config files:
./config.json
./transcriptconfig.json
Send ./openticketdebug.txt when there are errors!
*/
const discord = require("discord.js")
const fs = require('fs')
@@ -39,35 +72,13 @@ var tempconfig = require("./config.json")
var isDevConfig = false
if (process.argv.some((v) => v == "--devconfig")){
async function logFLAGS(){
const chalk = await (await import("chalk")).default
console.log(chalk.blue("[FLAGS] => used dev config instead of normal config"))
}; logFLAGS()
isDevConfig = true
try{
tempconfig = require("./devConfig.json")
tempconfig = require("./devconfig.json")
}catch{tempconfig = require("./config.json")}
}else{
tempconfig = require("./config.json")
}
if (process.argv.some((v) => v == "--nochecker")){
async function logFLAGS(){
const chalk = await (await import("chalk")).default
console.log(chalk.blue("[FLAGS] => disabled checker.js"))
}; logFLAGS()
}
if (process.argv.some((v) => v == "--tsoffline")){
async function logFLAGS(){
const chalk = await (await import("chalk")).default
console.log(chalk.blue("[FLAGS] => offline check for html transcripts disabled!"))
}; logFLAGS()
}
if (process.argv.some((v) => v == "--debug")){
async function logFLAGS(){
const chalk = await (await import("chalk")).default
console.log(chalk.blue("[FLAGS] => enabled DEBUG mode"))
}; logFLAGS()
}
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded flags")
exports.developerConfig = isDevConfig
@@ -118,74 +129,37 @@ client.on('ready',async () => {
}
client.user.setActivity(text,{type:getTypeEnum(type)})
statusSet = true
log("system","loaded status",[{key:"type",value:type},{key:"text",value:text}])
}
this.errorLog.log("debug","bot status loaded")
const chalk = await (await import("chalk")).default
if (!process.argv[2]){
console.log(chalk.red("WELCOME TO OPEN TICKET!"))
require("./core/startscreen").run()
if (!process.argv[2] || (process.argv[2] && !process.argv[2].startsWith("slash"))){
this.errorLog.log("debug","loaded console interface")
log("info","open ticket ready",[{key:"version",value:require("./package.json").version},{key:"language",value:config.languagefile}])
require("./core/utils/liveStatus")()
console.log(chalk.blue("\n\nlogs:")+"\n============")
if (config.status.enabled){
setStatus(config.status.type,config.status.text)
}
var updatingSlash = false
if (fs.existsSync("./storage/slashcmdEnabled.txt")){
/**@type {"true"|"false"} */
const data = fs.readFileSync("./storage/slashcmdEnabled.txt").toString()
if (data === "true"){require("./core/slashSystem/autoSlashUpdate")()}
if (data === "true"){require("./core/slashSystem/autoSlashUpdate")(); updatingSlash = true}
}else{fs.writeFileSync("./storage/slashcmdEnabled.txt","false")}
log("system","bot logged in!")
try {
await client.guilds.cache.find((g) => g.id == config.server_id).members.fetch()
}catch{
this.errorLog.log("info","tried to cache user information, failed!")
}
return
}
if (process.argv[2] == "d"){
if (config.status.enabled){
setStatus(config.status.type,config.status.text)
}
}
if (!process.argv[2].startsWith("slash")){
console.log(chalk.red("WELCOME TO OPEN TICKET!"))
this.errorLog.log("debug","loaded console interface")
log("info","open ticket ready",[{key:"version",value:require("./package.json").version},{key:"language",value:config.languagefile}])
require("./core/utils/liveStatus")()
console.log(chalk.blue("\n\nlogs:")+"\n============")
if (config.status.enabled){
setStatus(config.status.type,config.status.text)
}
if (fs.existsSync("./storage/slashcmdEnabled.txt")){
/**@type {"true"|"false"} */
const data = fs.readFileSync("./storage/slashcmdEnabled.txt").toString()
if (data === "true"){require("./core/slashSystem/autoSlashUpdate")()}
}else{fs.writeFileSync("./storage/slashcmdEnabled.txt","false")}
log("system","bot logged in!")
try {
await client.guilds.cache.find((g) => g.id == config.server_id).members.fetch()
}catch{
this.errorLog.log("info","tried to cache user information, failed!")
}
require("./core/startscreen").headerDataReady(chalk,config.status,updatingSlash,false)
}else{
console.log(chalk.red("STARTING IN ")+chalk.blue("SLASH MODE")+chalk.red("..."))
require("./core/startscreen").headerDataReady(chalk,config.status,updatingSlash,true)
this.errorLog.log("debug","slashmode activated")
console.log("logs:\n================")
console.log("client logged in...")
console.log("loading files...")
if (process.argv[3] == "enable"){
console.log(chalk.green("switching to slashEnable.js"))
require("./core/slashSystem/slashEnable")()
@@ -193,7 +167,7 @@ client.on('ready',async () => {
console.log(chalk.green("switching to slashDisable.js"))
require("./core/slashSystem/slashDisable")()
}else{
console.log(chalk.red("[SLASH CMD MANAGER]: unknown slash mode!"))
console.log(chalk.bgRed("[SLASH CMD MANAGER]: unknown slash command action!"))
process.exit(1)
}
}
+87
View File
@@ -0,0 +1,87 @@
{
"errors":{
"missingArgsTitle":"Неверные аргументы!",
"missingArgsDescription":"Отсутствует аргумент",
"noPermsTitle":"Недостаточно прав!",
"noPermsDescription":"Вы должны иметь права `ADMINISTRATOR` или быть в списке разрешённых ролей!",
"noPermsDelete":"Только админы могут удалить тикет!",
"chooseFromListTitle":"Неверный ID",
"chooseFromListDescription":"Выберите один из id ниже:",
"boterror":"Ошибка бота!",
"notInTicketTitle":"Вы не в тикете!",
"notInTicketDescription":"Эта команда не работает вне тикетов!",
"ticketDoesntExist":"Этого тикета больше не существует!",
"roleDoesntExist":"Этой роли больше не существует!",
"anotherOption":"Эта опция не является тикетом, а представляет собой другой тип!",
"maxAmountTitle":"Максимальное количество достигнуто!",
"maxAmountDescription":"Вы достигли максимальное количество разрешённых тикетов!\nТеперь вы не можете создать ещё один!",
"somethingWentWrong":"**Что-то пошло не так!**\nПожайлуста, попробуйте в другой раз!"
},
"commands":{
"userAddedTitle":"Добавлено {0} в этот тикет!",
"userRemovedTitle":"Удалено {0} из этого тикета!",
"renameTitle":"Изменено имя на {0}!",
"closeTitle":"Закрыл этот тикет!",
"deleteTitle":"Удаляем этот тикет...",
"reopenTitle":"Открываем заново этот тикет!",
"claimTitle":"Этот тикет теперь взят {0}",
"unclaimTitle":"Этот тикет никем не взят!",
"changeTitle":"Изменён тип тикета на {0}!",
"ticketWarning":"embed ниже сообщения!",
"maxTicketWarning":"**Предупреждение:** _Вы можете создать только {0} тикет(а/ов) в этот раз!_"
},
"helpMenu":{
"title":"Доступные команды:",
"header1":"**Перейдите в {0}, чтобы создать тикет!**\n\n",
"header2":"**Выполните команду `/new` или `/ticket` для создания тикета!**\n\n",
"msgCmd":"Создать embed с кнопками. (только админам)",
"renameCmd":"Переименовать тикет. (без пробелов)",
"closeCmd":"Закрыть тикет.",
"deleteCmd":"Удалить тикет.",
"addCmd":"Добавить пользователя в тикет.",
"removeCmd":"Удалить пользователя из тикета.",
"reopenCmd":"Открыть заново тикет после того, как он был закрыт."
},
"buttons":{
"close":"Закрыть тикет",
"delete":"Удалить тикет",
"reopen":"Открыть заново тикет",
"closeWithReason":"закрыть с причиной"
},
"messages":{
"reopenTitle":"Открыл заново этот тикет!",
"reopenDescription":"Не стесняйтесь обращаться снова!",
"closedTitle":"Закрыл этот тикет!",
"closedDescription":"Только админы теперь могут писать в этом тикете!\n\n*Нажмите на кнопку ниже, чтобы удалить или заново окрыть тикет!*",
"createdTitle":"Тикет создан!",
"createdDescription":"Ваш тикет создан, вы можете обнаружить его по пингу!",
"newTicketDmTitle":"Новый тикет!",
"closedTicketDmTitle":"Тикет закрыт!",
"deletedTicketDmTitle":"Тикет удалён!",
"closedTicketDmDescription":"Ваш тикет закрыт!",
"deletedTicketDmDescription":"Ваш тикет удалён!",
"reopenTicketDmTitle":"Тикет открыт заново!",
"reopenTicketDmDescription":"Ваш тикет открыт заново!",
"chooseCategory":"выберите категорию:",
"gettingdeleted":"Тикет будет удалён...",
"none":"отсутствует",
"reason":"причина",
"deletedby":"удалён",
"closedby":"закрыт",
"modalreason":"Какая причина закрытия этого тикета?",
"chooseATicket": "Выберите тикет"
},
"transcripts":{
"title":"Транскрипт",
"processed":"This transcript is being processed",
"wait":"Пожайлуста подождите!",
"estimated":"Оценочное время",
"available":"Транскрипт здесь доступен"
}
}
+25 -12
View File
@@ -9,6 +9,7 @@
"fr":"french",
"es-ES":"spanish",
"it":"italian",
"ru":"russian",
"MISSING":"arabic,portuguese",
"NOTAVAILABLE":"arabic,portuguese,czech"
@@ -23,7 +24,8 @@
"cs":"A list of the available commands",
"fr":"Une liste des commandes.",
"es-ES":"Una lista de los comandos disponibles.",
"it":"Una lista di tutti i comandi disponibili."
"it":"Una lista di tutti i comandi disponibili.",
"ru":"Список доступных команд"
},
"message":{
"en-GB":"Spawn an embed with buttons.",
@@ -34,7 +36,8 @@
"cs":"Spawn an embed with buttons.",
"fr":"Créer un embed avec des boutons.",
"es-ES":"Genera un embed con botones.",
"it":"Genera un embed con un pulsante."
"it":"Genera un embed con un pulsante.",
"ru":"Создать embed с кнопками"
},
"close":{
"en-GB":"Close a ticket.",
@@ -45,7 +48,8 @@
"cs":"Close a ticket.",
"fr":"Fermer un ticket.",
"es-ES":"Cierra un ticket.",
"it":"Chiudi un ticket."
"it":"Chiudi un ticket.",
"ru":"Закрыть тикет"
},
"delete":{
"en-GB":"Delete a ticket.",
@@ -56,7 +60,8 @@
"cs":"Delete a ticket.",
"fr":"Supprimer un ticket.",
"es-ES":"Elimina un ticket.",
"it":"Elimina un ticket."
"it":"Elimina un ticket.",
"ru":"Удалить тикет"
},
"reopen":{
"en-GB":"Re-Open a ticket.",
@@ -67,7 +72,8 @@
"cs":"Re-Open a ticket.",
"fr":"Re-ouvrir un ticket.",
"es-ES":"Re-abre un ticket.",
"it":"Ri-Apri un ticket."
"it":"Ri-Apri un ticket.",
"ru":"Открыть заново тикет"
},
"add":{
"en-GB":"Add another user to a ticket.",
@@ -78,7 +84,8 @@
"cs":"Add another user to a ticket.",
"fr":"Ajouter un utilisateur au ticket.",
"es-ES":"Agrega otro usuario al ticket.",
"it":"Aggiungi un membro al ticket"
"it":"Aggiungi un membro al ticket",
"ru":"Добавить другого пользователя в тикет"
},
"remove":{
"en-GB":"Remove a user from a ticket.",
@@ -89,7 +96,8 @@
"cs":"Remove a user from a ticket.",
"fr":"Enlever quelqu’un du ticket.",
"es-ES":"Elimina otro usuario del ticket.",
"it":"Rimuovi un membro dal ticket"
"it":"Rimuovi un membro dal ticket",
"ru":"Удалить пользователя из тикета"
},
"newticket":{
"en-GB":"Create a ticket",
@@ -100,7 +108,8 @@
"cs":"Create a ticket",
"fr":"Créer un ticket",
"es-ES":"Crear un ticket.",
"it":"Crea un ticket"
"it":"Crea un ticket",
"ru":"Создать тикет"
},
"rename":{
"en-GB":"Rename a ticket channel.",
@@ -111,7 +120,8 @@
"cs":"Rename a ticket channel",
"fr":"Renommer un ticket.",
"es-ES":"Renombrar un canal de ticket.",
"it":"Rinomina il canale di un ticket."
"it":"Rinomina il canale di un ticket.",
"ru":"Переименовать канал тикета"
},
"claim":{
"en-GB":"Claim a ticket.",
@@ -122,7 +132,8 @@
"cs":" ",
"fr":" ",
"es-ES":" ",
"it":" "
"it":" ",
"ru":"Взять тикет"
},
"unclaim":{
"en-GB":"Un-claim a ticket.",
@@ -133,7 +144,8 @@
"cs":" ",
"fr":" ",
"es-ES":" ",
"it":" "
"it":" ",
"ru":"Снять тикет"
},
"category":{
"en-GB":"Change ticket type.",
@@ -144,7 +156,8 @@
"cs":" ",
"fr":" ",
"es-ES":" ",
"it":" "
"it":" ",
"ru":"Изменить тип тикета"
}
}
}