UNPKG

discord-ticket-easy

Version:

- A module allowing the simple creation of a discord ticket with your client supported by Discord.js^14.0.0 - The easiest to use ticket module.

33 lines (23 loc) 631 B
const Client = require("./Client"); module.exports = class ClientError { constructor(status) { this.status = status this.client = Client } #toAsterisk(string) { let final = [] for (let i = 0; i < string.length; i++) { if (i < 4) { final.push(string.slice(i, i+1)) } else if (i > 4 && i < 50) { final.push("*") } else { final.push(string.slice(i, i+1)) } } return final.join("") } generate() { throw new Error(`${this.status} | Api key ${this.#toAsterisk(this.client.apiKey)} is not valid`) } }