# discord-ticketsystem

> An easy to use ticket system for Discord.js v12 and MongoDB!

Latest version **1.0.4** (published 2021-06-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install discord-ticketsystem
pnpm add discord-ticketsystem
yarn add discord-ticketsystem
bun add discord-ticketsystem
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-06-30 |
| First published | 2021-06-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.8.0 |
| Dependencies | 1 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fusion Terror |
| Maintainers | fusionterror |
| Keywords | discord, discord.js, discord-js, discord-tickets, discord-ticketsystem, discordbot, discord-bot, ticketsystem, ticket-system |

## Links

- npm: https://www.npmjs.com/package/discord-ticketsystem
- Repository: https://github.com/FusionTerror/discord-ticketsystem
- Homepage: https://github.com/FusionTerror/discord-ticketsystem#readme
- Issues: https://github.com/FusionTerror/discord-ticketsystem/issues
- npm.io page: https://npm.io/package/discord-ticketsystem

## Dependencies (1)

- [mongoose](https://npm.io/package/mongoose.md) ^5.13.0

## Recent versions

- 1.0.4 (latest) — 2021-06-30
- 1.0.3 — 2021-06-30
- 1.0.2 — 2021-06-29
- 1.0.1 — 2021-06-29
- 1.0.0 — 2021-06-29

## README

# Discord-TicketSystem 📖
##### *An easy to use ticket system for Discord.js v12 and MongoDB!*
##### 💖 ~ Support: [Fusion Terror's YouTube](https://www.youtube.com/channel/UCjTvZBc6GFbYkVs9rGWJLbA), [Fusion Terror's Patreon](https://www.patreon.com/fusionterror)
##### 🙋‍♂ ~ Help: [Discord Server](https://discord.gg/QJyTkNxVrX)
---
&nbsp;
## ✅ ~ Installation
```
npm i discord-ticketsystem
```
&nbsp;
## ⚙️ ~ Requirements
 ### You **must** have [mongoose](https://www.npmjs.com/package/mongoose) installed in your project.
&nbsp;
## 📝 ~ Features

- Interactive tickets.
- Create and close tickets quickly and effortlessly.
- MongoDB Support
- Discord.js 12 Support
- Discord Server Support
&nbsp;

## 💡 ~ Example
```js
const Discord = require('discord.js'); //Requiring Discord.js module.
const TicketSystem = require('discord-ticketsystem'); //Requiring Discord-TicketSystem module.
const client = new Discord.Client(); //Creating and assigning the Discord.js Client constructor.

TicketSystem.ticketURL(mongoDatabaseURL); //This is where you would pass in your Database connection string. This should only be your code ONCE.

client.on('ready', () => { //Discord.js Ready Event
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('message', msg => { //Discord.js Message Event
  if (msg.content === '!reactor') {
  	TicketSystem.createReactor(msg); //Creates a ticket reactor allowing users to react and make tickets.
  }
});

client.on('messageReactionAdd', (messageReaction, user) => { //Discord.js Message Reaction Add Event. (This event only checks reactions of cached messages. Therefore, if the bot goes offline you must make a new reactor (using !reactor) when it goes back online.
	TicketSystem.checkReaction(messageReaction, user);
});
```

---
_Source: https://npm.io/package/discord-ticketsystem · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
