@elara-services/tickets 4.3.3 → 4.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -62,6 +62,7 @@ declare module "@elara-services/tickets" {
62
62
  }
63
63
  }
64
64
  }
65
+
65
66
 
66
67
  interface LangFile {
67
68
  NO_BAN_PERMS_USER_IN_APPEAL_SERVER(server: Guild): string;
package/lib/base.js CHANGED
@@ -6,6 +6,7 @@ const {
6
6
  const { is, status, isV13, embedComment, log, emitPackageMessage } = require("@elara-services/utils");
7
7
  const { WebhookClient } = require("discord.js");
8
8
  const { name, version, funding } = require("../package.json");
9
+ const { inspect } = require("util");
9
10
  const required = ["client", "prefix", "encryptToken"];
10
11
  const moment = require("moment");
11
12
 
@@ -129,7 +130,7 @@ module.exports = class Tickets {
129
130
  return null;
130
131
  }
131
132
  if (this.options?.debug) {
132
- console.log(...args);
133
+ log(inspect(...args, true, 50));
133
134
  }
134
135
  return null;
135
136
  }
package/lib/util.js CHANGED
@@ -323,9 +323,9 @@ exports.hasTicket = ({ userId, guild, token, prefix } = {}) => {
323
323
  return guild.channels.cache.filter((c) => [0, "GUILD_TEXT"].includes(c.type) && c.topic && exports.code(c.topic.split("ID: ")[1], "d", token) === userId && c.name?.match?.(new RegExp(prefix, "gi"))).size ? true : false;
324
324
  };
325
325
 
326
- exports.embed = (content, { color, title, guild, footer, author, str } = {}) => ({
326
+ exports.embed = (content, { color, title, guild, footer, author, str, description } = {}) => ({
327
327
  title: title || str("INFO"),
328
- description: content,
328
+ description: content || description,
329
329
  color: color || 0xff0000,
330
330
  timestamp: new Date(),
331
331
  footer,
package/lib/v13.js CHANGED
@@ -151,7 +151,7 @@ module.exports = class Tickets extends base {
151
151
  return send({
152
152
  ephemeral: true,
153
153
  content,
154
- embeds: [embs],
154
+ embeds: embs,
155
155
  components: [
156
156
  {
157
157
  type: 1,
package/lib/v14.js CHANGED
@@ -147,7 +147,7 @@ module.exports = class Tickets extends base {
147
147
  return send({
148
148
  ephemeral: true,
149
149
  content,
150
- embeds: [embs],
150
+ embeds: embs,
151
151
  components: [
152
152
  {
153
153
  type: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/tickets",
3
- "version": "4.3.3",
3
+ "version": "4.3.5",
4
4
  "description": "Helper for tickets",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",