@elara-services/tickets 2.3.0 → 2.4.0
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 +1 -0
- package/index.js +3 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -53,6 +53,9 @@ module.exports = class Tickets {
|
|
|
53
53
|
};
|
|
54
54
|
switch (customId) {
|
|
55
55
|
case this.prefix: {
|
|
56
|
+
if (this.options.support?.ignore?.length) {
|
|
57
|
+
if (this.options.support.ignore.some(c => member.roles.cache.has(c))) return send({ content: `❌ You can no longer create tickets, if you believe this is a mistake contact one of the staff members.`, ephemeral: true });
|
|
58
|
+
}
|
|
56
59
|
if (this.options.modal?.enabled) return int.showModal(this.modal({ title: this.options.modal.title, components: this.options.modal.questions?.length >= 1 ? this.options.modal.questions.slice(0, 5).map(c => ({ type: 1, components: [{ min_length: c.min_length || 10, max_length: c.max_length || 4000, type: 4, style: c.style || 2, label: c.label, value: c.value, placeholder: c.placeholder, required: c.required, custom_id: c.label || `random_${Math.floor(Math.random() * 10000)}` }] })) : [] })).catch(e => this._debug(e));
|
|
57
60
|
return this.handleCreate({ guild, member, category, send })
|
|
58
61
|
};
|