djs-tickets-v2
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "djs-tickets-v2", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Create support tickets discord.js with low effort and easy to use", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,3 @@ # Useful Links | ||
const { DiscordTicketUpdated } = require('djs-tickets-v2`') | ||
const { DiscordTicketUpdated } = require('djs-tickets-v2') | ||
const ticket = new DiscordTicketUpdated() | ||
@@ -18,17 +18,65 @@ | ||
``` | ||
ticket.setRole(message, role) //SETS STAFF ROLE THAT GET PINGED WHEN NEW TICKET IS MADE | ||
ticket.setRole(message, role) //SETS STAFF ROLE THAT GET PINGED WHEN NEW TICKET IS MADE | ||
ticket.makeTicket(message, reason, "LMFAO") //MAKES A NEW TICKET | ||
ticket.makeTicket(message, reason, "LMFAO") //MAKES A NEW TICKET | ||
ticket.closeTicket(message, channel) //CLOSES AN EXISTING TICKET | ||
ticket.closeTicket(message, channel) //CLOSES AN EXISTING TICKET | ||
ticket.msgTicketChannel(message, channel, args) //SEND MESSAGE TO THE TICKET | ||
ticket.msgTicketChannel(message, channel, args) //SEND MESSAGE TO THE TICKET | ||
ticket.Category(message, ID) //SETS THE PARENT CATEGORY FOR A TICKET | ||
ticket.Category(message, ID) //SETS THE PARENT CATEGORY FOR A TICKET | ||
ticket.editEmbed(message, args) //EDITS THE EMBED MESSAGE SENT DURING NEW TICKET | ||
ticket.editEmbed(message, args) //EDITS THE EMBED MESSAGE SENT DURING NEW TICKET | ||
ticket.ticketAddUser(channel, user) //ADDS A USER TO THE TICKET | ||
ticket.ticketAddUser(channel, user) //ADDS A USER TO THE TICKET | ||
``` | ||
# Examples | ||
``` | ||
if (message.content.startsWith('/ticketrole')) { | ||
const role = message.mentions.roles.first() | ||
ticket.setRole(message, role) | ||
} | ||
if (message.content.startsWith('/tnew')) { | ||
const reason = message.content.slice(7) | ||
ticket.makeTicket(message, reason, "LMFAO") | ||
} | ||
if (message.content.startsWith('/tclose')) { | ||
const args = message.content.slice(6) | ||
const channel = message.mentions.channels.first() || message.guild.channels.cache.find(c => c.id == args || c.name == args) || message.channel | ||
ticket.closeTicket(message, channel) | ||
} | ||
if (message.content.startsWith('/tsend')) { | ||
const channel = message.mentions.channels.first() | ||
const args = message.content.slice(5) | ||
ticket.msgTicketChannel(message, channel, args) | ||
} | ||
if (message.content.startsWith('/tcategory')) { | ||
const ID = message.content.slice(9) | ||
ticket.Category(message, ID) | ||
message.channel.send(`Ticket Category has been set!`) | ||
} | ||
if (message.content.startsWith('/tembed')) { | ||
const args = message.content.slice(14) | ||
ticket.editEmbed(message, args) | ||
} | ||
if(message.content.startsWith(`/tadduser`)) { | ||
const channel = message.mentions.channels.first() | ||
const user = message.mentions.users.first() | ||
ticket.ticketAddUser(channel, user) | ||
} | ||
if (message.content === `/tid`) { | ||
const ID = await ticket.fetchChanID(message) | ||
message.channel.send(`This channels id is ${ID}`) | ||
} | ||
``` | ||
# Values/Syntax | ||
@@ -35,0 +83,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13266
170