Fixed some translation errors & added Catalan!
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ export const registerCommandResponders = async () => {
|
||||
//return when user already added to ticket
|
||||
const participants = await openticket.tickets.getAllTicketParticipants(ticket)
|
||||
if (!participants || participants.find((p) => p.user.id == data.id)){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"This user is already able to access the ticket!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.add"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when already closed
|
||||
if (ticket.get("openticket:closed").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is already closed!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.close"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when already claimed
|
||||
if (ticket.get("openticket:claimed").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is already claimed!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.claim"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when already closed
|
||||
if (ticket.get("openticket:closed").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is already closed!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.close"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -66,7 +66,7 @@ export const registerCommandResponders = async () => {
|
||||
const option = openticket.options.get(id)
|
||||
//return if unknown option
|
||||
if (!option || !(option instanceof api.ODTicketOption)){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Unknown Option",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.titles.unknownOption"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return if option is the same
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when already pinned
|
||||
if (ticket.get("openticket:pinned").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is already pinned!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.pin"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -66,7 +66,7 @@ export const registerCommandResponders = async () => {
|
||||
//return when user is not a participant of the ticket (admins & creator can't be removed)
|
||||
const participants = await openticket.tickets.getAllTicketParticipants(ticket)
|
||||
if (!participants || !participants.find((p) => p.user.id == data.id && p.role == "participant")){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Unable to remove this user from the ticket!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.remove"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when not closed
|
||||
if (!ticket.get("openticket:closed").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is not closed yet!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.reopen"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when not claimed
|
||||
if (!ticket.get("openticket:claimed").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is not claimed yet!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.unclaim"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
@@ -56,7 +56,7 @@ export const registerCommandResponders = async () => {
|
||||
}
|
||||
//return when not pinned yet
|
||||
if (!ticket.get("openticket:pinned").value){
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:"Ticket is not pinned yet!",layout:"simple"}))
|
||||
instance.reply(await openticket.builders.messages.getSafe("openticket:error").build("button",{guild,channel,user,error:openticket.languages.getTranslation("errors.actionInvalid.unpin"),layout:"simple"}))
|
||||
return cancel()
|
||||
}
|
||||
//return when busy
|
||||
|
||||
Reference in New Issue
Block a user