Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

djs-tickets-v2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djs-tickets-v2 - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc