v2.1.0 push 6
Added english.json
This commit is contained in:
+3
-3
@@ -11,16 +11,16 @@ module.exports = () => {
|
|||||||
|
|
||||||
const prefix = config.prefix
|
const prefix = config.prefix
|
||||||
const header = config.system.ticket_channel ? "**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n" : "**Run the command `/new` or `/ticket` to create a ticket!**\n\n"
|
const header = config.system.ticket_channel ? "**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n" : "**Run the command `/new` or `/ticket` to create a ticket!**\n\n"
|
||||||
helpEmbed.setDescription(header+"`"+prefix+"msg <id>` ➜ _Spawn an embed with buttons. (admin only)_\n\n`"+prefix+"rename <name>` ➜ _Rename a ticket. (no spaces)_\n`"+prefix+"close` ➜ _Close a ticket._\n`"+prefix+"delete` ➜ _Delete a ticket._\n\n`"+prefix+"add <user>` ➜ _Add a user to the ticket._\n`"+prefix+"remove <user>` ➜ _Remove a user from the ticket._`")
|
helpEmbed.setDescription(header+"`"+prefix+"msg <id>` ➜ _Spawn an embed with buttons. (admin only)_\n\n`"+prefix+"rename <name>` ➜ _Rename a ticket. (no spaces)_\n`"+prefix+"close` ➜ _Close a ticket._\n`"+prefix+"delete` ➜ _Delete a ticket._\n`"+prefix+"reopen` ➜ _Re-Open a ticket after it was closed._\n\n`"+prefix+"add <user>` ➜ _Add a user to the ticket._\n`"+prefix+"remove <user>` ➜ _Remove a user from the ticket._`")
|
||||||
|
|
||||||
if (config.credits) helpEmbed.setFooter({text:"Open-Ticket by DJdj Development | view on github for source code"})
|
if (config.credits) helpEmbed.setFooter({text:"Open-Ticket by DJdj Development | view on github for source code",iconURL:"https://raw.githubusercontent.com/DJj123dj/open-ticket/main/logo.png"})
|
||||||
|
|
||||||
|
|
||||||
client.on("messageCreate",msg => {
|
client.on("messageCreate",msg => {
|
||||||
if (!msg.content.startsWith(config.prefix)) return
|
if (!msg.content.startsWith(config.prefix)) return
|
||||||
var args = msg.content.split(config.prefix)
|
var args = msg.content.split(config.prefix)
|
||||||
|
|
||||||
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename")){
|
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename") && !args[1].startsWith("reopen")){
|
||||||
|
|
||||||
msg.channel.send({embeds:[helpEmbed]})
|
msg.channel.send({embeds:[helpEmbed]})
|
||||||
log("command","someone used the 'help' command",[{key:"user",value:msg.author.tag}])
|
log("command","someone used the 'help' command",[{key:"user",value:msg.author.tag}])
|
||||||
|
|||||||
+5
-15
@@ -32,27 +32,17 @@ module.exports = () => {
|
|||||||
|
|
||||||
client.on("interactionCreate",(interaction) => {
|
client.on("interactionCreate",(interaction) => {
|
||||||
if (!interaction.isCommand()) return
|
if (!interaction.isCommand()) return
|
||||||
if (interaction.commandName != "add") return
|
if (interaction.commandName != "reopen") return
|
||||||
const user = interaction.options.getUser("user")
|
|
||||||
|
|
||||||
const permsmember = client.guilds.cache.find(g => g.id == interaction.guild.id).members.cache.find(m => m.id == interaction.member.id)
|
|
||||||
if (config.main_adminroles.some((item)=>{return interaction.guild.members.cache.find((m) => m.id == interaction.member.id).roles.cache.has(item)}) == false && permsmember.permissions.has("ADMINISTRATOR")){
|
|
||||||
interaction.reply({embeds:[bot.errorLog.noPermsMessage]})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||||
var firstmsg = msglist.last()
|
var firstmsg = msglist.last()
|
||||||
|
|
||||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||||
|
|
||||||
interaction.channel.permissionOverwrites.create(user.id, { VIEW_CHANNEL:true, ADD_REACTIONS:true,ATTACH_FILES:true, EMBED_LINKS:true, SEND_MESSAGES:true})
|
interaction.reply({embeds:[bot.errorLog.success("Re-Open this ticket!","You can re-open this ticket by clicking on the button below!")],components:[reopenCommandBar]})
|
||||||
interaction.reply({embeds:[bot.errorLog.success("User Added!",user.tag+" is added to this ticket")]})
|
|
||||||
|
|
||||||
var loguser = user
|
|
||||||
log("command","someone used the 'add' command",[{key:"user",value:interaction.user.tag}])
|
log("command","someone used the 'reopen' command",[{key:"user",value:interaction.user.tag}])
|
||||||
log("system","user added to ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"added_user",value:loguser.tag}])
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ module.exports = () => {
|
|||||||
interaction.guild.channels.create(ticketName,{
|
interaction.guild.channels.create(ticketName,{
|
||||||
type:"GUILD_TEXT",
|
type:"GUILD_TEXT",
|
||||||
parent:newTicketCategory,
|
parent:newTicketCategory,
|
||||||
reason:"A new ticket was created",
|
reason:"A new ticket is created",
|
||||||
permissionOverwrites:permissionsArray
|
permissionOverwrites:permissionsArray
|
||||||
|
|
||||||
}).then((ticketChannel) => {
|
}).then((ticketChannel) => {
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"errors":{
|
||||||
|
"missingArgsTitle":"Invalid Arguments!",
|
||||||
|
"missingArgsDescription":"Missing Argument",
|
||||||
|
"noPermsTitle":"No Permissions!",
|
||||||
|
"noPermsDescription":"You don't have the correct roles to run this command!\nYou need the `ADMINISTRATOR` permission or be in the list of allowed roles!",
|
||||||
|
"chooseFromList":"Choose one of the id's below:",
|
||||||
|
"notInTicketTitle":"You are not in a ticket!",
|
||||||
|
"notInTicketDescription":"This command doesn't work outside tickets!",
|
||||||
|
"ticketDoesntExist":"This ticket doesn't exist anymore!",
|
||||||
|
"roleDoesntExist":"This role doesn't exist anymore!",
|
||||||
|
"anotherOption":"This option is not a ticket but another type!",
|
||||||
|
"maxAmountTitle":"Max amount reached!",
|
||||||
|
"maxAmountDescription":"You reached the maximum number of tickets allowed!\nSo you can't create a new one!",
|
||||||
|
"somethingWentWrong":"Something went wrong!**\nPlease try again another time!",
|
||||||
|
"somethingWentWrongTranscript":"Something went wrong while making the transcript!**\nPlease try again another time!"
|
||||||
|
},
|
||||||
|
"commands":{
|
||||||
|
"userAddedTitle":"User Added!",
|
||||||
|
"userAddedDescription":"{0} is added to this ticket!",
|
||||||
|
"userRemovedTitle":"User Removed!",
|
||||||
|
"userRemovedDescription":"{0} is removed from this ticket!",
|
||||||
|
|
||||||
|
"renameTitle":"The name is changed!",
|
||||||
|
"renameWarning":"Warning: you can only change the channel name 2 times per minute!\n(this is due discord rate limits)",
|
||||||
|
|
||||||
|
"closeTitle":"Close this ticket!",
|
||||||
|
"closeDescription":"You can close this ticket by clicking on the button below!",
|
||||||
|
"deleteTitle":"Delete this ticket!",
|
||||||
|
"deleteDescription":"You can delete this ticket by clicking on the button below!",
|
||||||
|
"reopenTitle":"Re-Open this ticket!",
|
||||||
|
"reopenDescription":"You can re-open this ticket by clicking on the button below!",
|
||||||
|
|
||||||
|
"ticketWarning":"The embed is in the message below!",
|
||||||
|
"maxTicketWarning":"**Warning:** _You can only create {0} ticket(s) at a time!_"
|
||||||
|
},
|
||||||
|
"helpMenu":{
|
||||||
|
"title":"Help Menu:",
|
||||||
|
"header1":"**Go to {0} to create a ticket!**\n\n",
|
||||||
|
"header2":"**Run the command `/new` or `/ticket` to create a ticket!**\n\n",
|
||||||
|
|
||||||
|
"msgCmd":"Spawn an embed with buttons. (admin only)",
|
||||||
|
"renameCmd":"Rename a ticket. (no spaces)",
|
||||||
|
"closeCmd":"Close a ticket.",
|
||||||
|
"deleteCmd":"Delete a ticket.",
|
||||||
|
"addCmd":"Add a user to the ticket.",
|
||||||
|
"removeCmd":"Remove a user from the ticket.",
|
||||||
|
"reopenCmd":"Re-Open a ticket after it was closed."
|
||||||
|
},
|
||||||
|
"buttons":{
|
||||||
|
"close":"Close Ticket",
|
||||||
|
"delete":"Delete Ticket",
|
||||||
|
"reopen":"Re-Open Ticket",
|
||||||
|
"sendTranscript":"Send Transcript File"
|
||||||
|
},
|
||||||
|
"messages":{
|
||||||
|
"reopenTitle":"Re-Opened this ticket!",
|
||||||
|
"reopenDescription":"Feel free to talk again!",
|
||||||
|
"closedTitle":"Closed this ticket!",
|
||||||
|
"closedDescription":"Only admins can talk in this ticket now!\n\n*Click on the button below to delete this ticket or to re-open it!*",
|
||||||
|
"createdTitle":"Ticket Created!",
|
||||||
|
"createdDescription":"Your ticket is created, you can detect it by a ping!",
|
||||||
|
|
||||||
|
"newTicketDmTitle":"New Ticket!",
|
||||||
|
"newTranscriptTitle":"A new transcript is here!",
|
||||||
|
"newTranscriptDescription":"You can find the transcript in the text file above!",
|
||||||
|
"hereIsTheTranscript":"Here is the transcript:",
|
||||||
|
|
||||||
|
"chooseCategory":"choose a category:"
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user