Merge branch 'main' of https://git.shadowhosting.xyz/shadow/Discord_API_Bot
This commit is contained in:
commit
de5942cba7
7 changed files with 364 additions and 767 deletions
|
@ -1,98 +1,31 @@
|
||||||
const a12_0x274e70 = function () {
|
const { auth_url } = require("../config");
|
||||||
let _0x507249 = true;
|
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||||
return function (_0x14e144, _0x302e5a) {
|
|
||||||
const _0x561d0d = _0x507249 ? function () {
|
|
||||||
if (_0x302e5a) {
|
|
||||||
const _0x24efe0 = _0x302e5a.apply(_0x14e144, arguments);
|
|
||||||
_0x302e5a = null;
|
|
||||||
return _0x24efe0;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x507249 = false;
|
|
||||||
return _0x561d0d;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a12_0x1484d4 = a12_0x274e70(this, function () {
|
|
||||||
return a12_0x1484d4.toString().search("(((.+)+)+)+$").toString().constructor(a12_0x1484d4).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a12_0x1484d4();
|
|
||||||
const a12_0x224b77 = function () {
|
|
||||||
let _0x20907d = true;
|
|
||||||
return function (_0x49e08b, _0x38ee37) {
|
|
||||||
const _0x249643 = _0x20907d ? function () {
|
|
||||||
if (_0x38ee37) {
|
|
||||||
const _0x1fe048 = _0x38ee37.apply(_0x49e08b, arguments);
|
|
||||||
_0x38ee37 = null;
|
|
||||||
return _0x1fe048;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x20907d = false;
|
|
||||||
return _0x249643;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a12_0x224b77(this, function () {
|
|
||||||
const _0x203ce3 = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x50a520 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x2d65d2 = a12_0x1596af("init");
|
|
||||||
if (!_0x203ce3.test(_0x2d65d2 + "chain") || !_0x50a520.test(_0x2d65d2 + "input")) {
|
|
||||||
_0x2d65d2('0');
|
|
||||||
} else {
|
|
||||||
a12_0x1596af();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
auth_url
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
EmbedBuilder
|
|
||||||
} = require('discord.js');
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName("link").setDescription("Link your Discord account to the hosting panel"),
|
data: new SlashCommandBuilder()
|
||||||
async 'run'(_0x251116, _0x4e03a1) {
|
.setName("link")
|
||||||
const _0x2a7b3d = {
|
.setDescription("Link your Discord account to the hosting panel"),
|
||||||
"ephemeral": true
|
|
||||||
|
async run(interaction) {
|
||||||
|
const deferOptions = { ephemeral: true };
|
||||||
|
await interaction.deferReply(deferOptions);
|
||||||
|
|
||||||
|
const authorText = { name: "Link Your Account" };
|
||||||
|
const footerText = { text: "Coded by @onurcansevinc" };
|
||||||
|
const thumbnailOptions = { dynamic: true };
|
||||||
|
|
||||||
|
let linkEmbed = new EmbedBuilder()
|
||||||
|
.setColor('Random')
|
||||||
|
.setAuthor(authorText)
|
||||||
|
.setFooter(footerText)
|
||||||
|
.setThumbnail(interaction.guild.iconURL(thumbnailOptions))
|
||||||
|
.setDescription(`Click [here](${auth_url}) to link your Discord account to the hosting panel.`);
|
||||||
|
|
||||||
|
const replyOptions = {
|
||||||
|
embeds: [linkEmbed],
|
||||||
|
ephemeral: true
|
||||||
};
|
};
|
||||||
await _0x4e03a1.deferReply(_0x2a7b3d);
|
|
||||||
const _0x1e005b = {
|
return interaction.editReply(replyOptions);
|
||||||
name: "Link Your Account"
|
|
||||||
};
|
|
||||||
const _0x37862e = {
|
|
||||||
'text': "Coded by @onurcansevinc"
|
|
||||||
};
|
|
||||||
const _0x47db59 = {
|
|
||||||
dynamic: true
|
|
||||||
};
|
|
||||||
let _0x3c85e6 = new EmbedBuilder().setColor('Random').setAuthor(_0x1e005b).setFooter(_0x37862e).setThumbnail(_0x4e03a1.guild.iconURL(_0x47db59)).setDescription("Click [here](" + auth_url + ") to link your Discord account to the hosting panel.");
|
|
||||||
const _0x4b1d54 = {
|
|
||||||
"embeds": [_0x3c85e6],
|
|
||||||
"ephemeral": true
|
|
||||||
};
|
|
||||||
return _0x4e03a1.editReply(_0x4b1d54);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a12_0x1596af(_0x4fcc67) {
|
|
||||||
function _0x4e20dd(_0x26ec2a) {
|
|
||||||
if (typeof _0x26ec2a === 'string') {
|
|
||||||
return function (_0x5ead9f) {}.constructor("while (true) {}").apply("counter");
|
|
||||||
} else if (('' + _0x26ec2a / _0x26ec2a).length !== 0x1 || _0x26ec2a % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call("action");
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
_0x4e20dd(++_0x26ec2a);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x4fcc67) {
|
|
||||||
return _0x4e20dd;
|
|
||||||
} else {
|
|
||||||
_0x4e20dd(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x5c7842) {}
|
|
||||||
}
|
|
|
@ -1,100 +1,41 @@
|
||||||
const a13_0x6d3ab5 = function () {
|
const { ticket_settings } = require('../config');
|
||||||
let _0x32ded4 = true;
|
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||||
return function (_0x120fee, _0x253fc1) {
|
|
||||||
const _0x474919 = _0x32ded4 ? function () {
|
|
||||||
if (_0x253fc1) {
|
|
||||||
const _0xb5c7d2 = _0x253fc1.apply(_0x120fee, arguments);
|
|
||||||
_0x253fc1 = null;
|
|
||||||
return _0xb5c7d2;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x32ded4 = false;
|
|
||||||
return _0x474919;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a13_0x52c0e3 = a13_0x6d3ab5(this, function () {
|
|
||||||
return a13_0x52c0e3.toString().search("(((.+)+)+)+$").toString().constructor(a13_0x52c0e3).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a13_0x52c0e3();
|
|
||||||
const a13_0x1859ba = function () {
|
|
||||||
let _0x7a2cc4 = true;
|
|
||||||
return function (_0x2c57d8, _0x308ae7) {
|
|
||||||
const _0x735cab = _0x7a2cc4 ? function () {
|
|
||||||
if (_0x308ae7) {
|
|
||||||
const _0x3e662e = _0x308ae7.apply(_0x2c57d8, arguments);
|
|
||||||
_0x308ae7 = null;
|
|
||||||
return _0x3e662e;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x7a2cc4 = false;
|
|
||||||
return _0x735cab;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a13_0x1859ba(this, function () {
|
|
||||||
const _0x39024a = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x25b61f = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x23f1f1 = a13_0x58a52a('init');
|
|
||||||
if (!_0x39024a.test(_0x23f1f1 + "chain") || !_0x25b61f.test(_0x23f1f1 + 'input')) {
|
|
||||||
_0x23f1f1('0');
|
|
||||||
} else {
|
|
||||||
a13_0x58a52a();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
ticket_settings
|
|
||||||
} = require('../config');
|
|
||||||
const {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
PermissionFlagsBits,
|
|
||||||
EmbedBuilder
|
|
||||||
} = require("discord.js");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName("remove-question").setDescription("Remove the question from ticket form").addStringOption(_0x317baa => _0x317baa.setRequired(true).setName("question").setAutocomplete(true).setDescription("Select the question.")).setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
data: new SlashCommandBuilder()
|
||||||
async 'run'(_0x57500c, _0xebe4db) {
|
.setName("remove-question")
|
||||||
let {
|
.setDescription("Remove the question from ticket form")
|
||||||
options: _0x197071
|
.addStringOption(option =>
|
||||||
} = _0xebe4db;
|
option
|
||||||
const _0x3909a6 = {
|
.setRequired(true)
|
||||||
"ephemeral": true
|
.setName("question")
|
||||||
|
.setAutocomplete(true)
|
||||||
|
.setDescription("Select the question.")
|
||||||
|
)
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
|
|
||||||
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
|
||||||
|
const deferOptions = { ephemeral: true };
|
||||||
|
await interaction.deferReply(deferOptions);
|
||||||
|
|
||||||
|
let questionId = options.getString("question");
|
||||||
|
|
||||||
|
const authorText = { name: interaction.guild.name };
|
||||||
|
let removeEmbed = new EmbedBuilder()
|
||||||
|
.setColor(ticket_settings.embed_color)
|
||||||
|
.setAuthor(authorText)
|
||||||
|
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||||
|
.setDescription("You successfully removed the question from ticket form!");
|
||||||
|
|
||||||
|
db.query(`DELETE FROM questions WHERE id='${questionId}'`);
|
||||||
|
|
||||||
|
const replyOptions = {
|
||||||
|
embeds: [removeEmbed],
|
||||||
|
ephemeral: true
|
||||||
};
|
};
|
||||||
await _0xebe4db.deferReply(_0x3909a6);
|
|
||||||
let _0x1d1a4e = _0x197071.getString("question");
|
return interaction.editReply(replyOptions);
|
||||||
const _0x31e4b2 = {
|
|
||||||
name: _0xebe4db.guild.name
|
|
||||||
};
|
|
||||||
let _0x27fe9b = new EmbedBuilder().setColor(ticket_settings.embed_color).setAuthor(_0x31e4b2).setThumbnail(ticket_settings.ticket_thumbnail).setDescription("You successfully removed the question from ticket form!");
|
|
||||||
db.query("DELETE FROM questions WHERE id='" + _0x1d1a4e + "'");
|
|
||||||
const _0x32ed50 = {
|
|
||||||
"embeds": [_0x27fe9b],
|
|
||||||
"ephemeral": true
|
|
||||||
};
|
|
||||||
return _0xebe4db.editReply(_0x32ed50);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a13_0x58a52a(_0x3ebf0d) {
|
|
||||||
function _0x491112(_0x5bde72) {
|
|
||||||
if (typeof _0x5bde72 === "string") {
|
|
||||||
return function (_0x3b1080) {}.constructor("while (true) {}").apply("counter");
|
|
||||||
} else {
|
|
||||||
if (('' + _0x5bde72 / _0x5bde72).length !== 0x1 || _0x5bde72 % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call("action");
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x491112(++_0x5bde72);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x3ebf0d) {
|
|
||||||
return _0x491112;
|
|
||||||
} else {
|
|
||||||
_0x491112(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x3718b9) {}
|
|
||||||
}
|
|
|
@ -1,112 +1,55 @@
|
||||||
const a14_0x226f78 = function () {
|
const { ticket_settings } = require("../config");
|
||||||
let _0x1b3f0a = true;
|
const { queryMulti } = require("../helpers/helper");
|
||||||
return function (_0x56ec6a, _0x2f467e) {
|
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||||
const _0x7e427e = _0x1b3f0a ? function () {
|
|
||||||
if (_0x2f467e) {
|
|
||||||
const _0x17f7f8 = _0x2f467e.apply(_0x56ec6a, arguments);
|
|
||||||
_0x2f467e = null;
|
|
||||||
return _0x17f7f8;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x1b3f0a = false;
|
|
||||||
return _0x7e427e;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a14_0x63755a = a14_0x226f78(this, function () {
|
|
||||||
return a14_0x63755a.toString().search("(((.+)+)+)+$").toString().constructor(a14_0x63755a).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a14_0x63755a();
|
|
||||||
const a14_0x13e965 = function () {
|
|
||||||
let _0x2bf385 = true;
|
|
||||||
return function (_0x26dd3b, _0x33485b) {
|
|
||||||
const _0xad0e1c = _0x2bf385 ? function () {
|
|
||||||
if (_0x33485b) {
|
|
||||||
const _0x5a663a = _0x33485b.apply(_0x26dd3b, arguments);
|
|
||||||
_0x33485b = null;
|
|
||||||
return _0x5a663a;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x2bf385 = false;
|
|
||||||
return _0xad0e1c;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a14_0x13e965(this, function () {
|
|
||||||
const _0x1438d4 = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x4b0184 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x150ec2 = a14_0x43c4e0("init");
|
|
||||||
if (!_0x1438d4.test(_0x150ec2 + "chain") || !_0x4b0184.test(_0x150ec2 + "input")) {
|
|
||||||
_0x150ec2('0');
|
|
||||||
} else {
|
|
||||||
a14_0x43c4e0();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
ticket_settings
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
|
||||||
queryMulti
|
|
||||||
} = require("../helpers/helper");
|
|
||||||
const {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
PermissionFlagsBits,
|
|
||||||
EmbedBuilder
|
|
||||||
} = require("discord.js");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName("remove-ticket-option").setDescription("Remove the option from tickets").addStringOption(_0x3041a0 => _0x3041a0.setName('option').setRequired(true).setAutocomplete(true).setDescription("Select the option.")).setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
data: new SlashCommandBuilder()
|
||||||
async 'run'(_0x193bcc, _0x126ce1) {
|
.setName("remove-ticket-option")
|
||||||
let {
|
.setDescription("Remove the option from tickets")
|
||||||
options: _0x1773b8
|
.addStringOption(option =>
|
||||||
} = _0x126ce1;
|
option
|
||||||
const _0x458456 = {
|
.setName('option')
|
||||||
|
.setRequired(true)
|
||||||
|
.setAutocomplete(true)
|
||||||
|
.setDescription("Select the option.")
|
||||||
|
)
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
|
|
||||||
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
|
||||||
|
const deferOptions = { ephemeral: true };
|
||||||
|
await interaction.deferReply(deferOptions);
|
||||||
|
|
||||||
|
let optionId = options.getString("option");
|
||||||
|
|
||||||
|
const authorText = { name: interaction.guild.name };
|
||||||
|
let removeEmbed = new EmbedBuilder()
|
||||||
|
.setColor(ticket_settings.embed_color)
|
||||||
|
.setAuthor(authorText)
|
||||||
|
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||||
|
.setDescription("You successfully removed the option!");
|
||||||
|
|
||||||
|
let existingOptions = await queryMulti(db, `SELECT * FROM options WHERE guildID='${interaction.guildId}'`);
|
||||||
|
|
||||||
|
const maxOptionsReply = {
|
||||||
|
embeds: [removeEmbed],
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
};
|
};
|
||||||
await _0x126ce1.deferReply(_0x458456);
|
|
||||||
let _0x4b0c72 = _0x1773b8.getString("option");
|
if (existingOptions.length > 5) {
|
||||||
const _0x33bac2 = {
|
return interaction.editReply(maxOptionsReply);
|
||||||
'name': _0x126ce1.guild.name
|
|
||||||
};
|
|
||||||
let _0x1354ed = new EmbedBuilder().setColor(ticket_settings.embed_color).setAuthor(_0x33bac2).setThumbnail(ticket_settings.ticket_thumbnail).setDescription("You successfully removed the option!");
|
|
||||||
let _0x2e11b3 = await queryMulti(db, "SELECT * FROM options WHERE guildID='" + _0x126ce1.guildId + "'");
|
|
||||||
const _0x5b030c = {
|
|
||||||
"embeds": [_0x1354ed],
|
|
||||||
"ephemeral": true
|
|
||||||
};
|
|
||||||
if (_0x2e11b3.length > 0x5) {
|
|
||||||
return _0x126ce1.editReply(_0x5b030c);
|
|
||||||
}
|
}
|
||||||
db.query("DELETE FROM options WHERE id='" + _0x4b0c72 + "'");
|
|
||||||
_0x1354ed.setDescription("You successfully created new option!");
|
db.query(`DELETE FROM options WHERE id='${optionId}'`);
|
||||||
const _0x3d5d07 = {
|
|
||||||
"embeds": [_0x1354ed],
|
removeEmbed.setDescription("You successfully created new option!");
|
||||||
"ephemeral": true
|
|
||||||
|
const successReply = {
|
||||||
|
embeds: [removeEmbed],
|
||||||
|
ephemeral: true
|
||||||
};
|
};
|
||||||
return _0x126ce1.editReply(_0x3d5d07);
|
|
||||||
|
return interaction.editReply(successReply);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a14_0x43c4e0(_0x5d55b8) {
|
|
||||||
function _0x4150d0(_0x3491bc) {
|
|
||||||
if (typeof _0x3491bc === "string") {
|
|
||||||
return function (_0x2bf048) {}.constructor("while (true) {}").apply('counter');
|
|
||||||
} else {
|
|
||||||
if (('' + _0x3491bc / _0x3491bc).length !== 0x1 || _0x3491bc % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call("action");
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x4150d0(++_0x3491bc);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x5d55b8) {
|
|
||||||
return _0x4150d0;
|
|
||||||
} else {
|
|
||||||
_0x4150d0(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x3a97ba) {}
|
|
||||||
}
|
|
|
@ -1,52 +1,4 @@
|
||||||
const a15_0x4e7d45 = function () {
|
const { ticket_settings, review_channelID, review_products } = require("../config");
|
||||||
let _0x3df048 = true;
|
|
||||||
return function (_0x443e2f, _0x2900b1) {
|
|
||||||
const _0x3fb57e = _0x3df048 ? function () {
|
|
||||||
if (_0x2900b1) {
|
|
||||||
const _0x48eddd = _0x2900b1.apply(_0x443e2f, arguments);
|
|
||||||
_0x2900b1 = null;
|
|
||||||
return _0x48eddd;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x3df048 = false;
|
|
||||||
return _0x3fb57e;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a15_0xed88ac = a15_0x4e7d45(this, function () {
|
|
||||||
return a15_0xed88ac.toString().search("(((.+)+)+)+$").toString().constructor(a15_0xed88ac).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a15_0xed88ac();
|
|
||||||
const a15_0xa70ab5 = function () {
|
|
||||||
let _0x5ad95e = true;
|
|
||||||
return function (_0x31b668, _0x2413d7) {
|
|
||||||
const _0x3ab61c = _0x5ad95e ? function () {
|
|
||||||
if (_0x2413d7) {
|
|
||||||
const _0x1c4123 = _0x2413d7.apply(_0x31b668, arguments);
|
|
||||||
_0x2413d7 = null;
|
|
||||||
return _0x1c4123;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x5ad95e = false;
|
|
||||||
return _0x3ab61c;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a15_0xa70ab5(this, function () {
|
|
||||||
const _0x29a378 = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x2c4cab = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x21f930 = a15_0x29149d("init");
|
|
||||||
if (!_0x29a378.test(_0x21f930 + "chain") || !_0x2c4cab.test(_0x21f930 + "input")) {
|
|
||||||
_0x21f930('0');
|
|
||||||
} else {
|
|
||||||
a15_0x29149d();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
ticket_settings,
|
|
||||||
review_channelID,
|
|
||||||
review_products
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
const {
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
|
@ -55,115 +7,105 @@ const {
|
||||||
TextInputStyle,
|
TextInputStyle,
|
||||||
ActionRowBuilder
|
ActionRowBuilder
|
||||||
} = require("discord.js");
|
} = require("discord.js");
|
||||||
const a15_0x5382cf = {
|
|
||||||
"name": '⭐⭐⭐⭐⭐',
|
const fiveStars = { name: '⭐⭐⭐⭐⭐', value: '⭐⭐⭐⭐⭐' };
|
||||||
"value": "⭐⭐⭐⭐⭐"
|
const fourStars = { name: '⭐⭐⭐⭐', value: '⭐⭐⭐⭐' };
|
||||||
};
|
const threeStars = { name: '⭐⭐⭐', value: '⭐⭐⭐' };
|
||||||
const a15_0x45875d = {
|
const twoStars = { name: '⭐⭐', value: '⭐⭐' };
|
||||||
name: "⭐⭐⭐⭐",
|
const oneStar = { name: '⭐', value: '⭐' };
|
||||||
value: "⭐⭐⭐⭐"
|
|
||||||
};
|
|
||||||
const a15_0x2f548a = {
|
|
||||||
"name": '⭐⭐⭐',
|
|
||||||
value: '⭐⭐⭐'
|
|
||||||
};
|
|
||||||
const a15_0x2c4101 = {
|
|
||||||
"name": '⭐⭐',
|
|
||||||
value: '⭐⭐'
|
|
||||||
};
|
|
||||||
const a15_0x29d267 = {
|
|
||||||
"name": '⭐',
|
|
||||||
value: '⭐'
|
|
||||||
};
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName('review').setDescription("Review a product").addStringOption(_0x5877f8 => _0x5877f8.setRequired(true).setName('product').setDescription("Select the product").addChoices(...review_products.map(_0x1ebc25 => {
|
data: new SlashCommandBuilder()
|
||||||
const _0xefe5db = {
|
.setName('review')
|
||||||
name: _0x1ebc25.name,
|
.setDescription("Review a product")
|
||||||
value: _0x1ebc25.value
|
.addStringOption(option =>
|
||||||
};
|
option
|
||||||
return _0xefe5db;
|
.setRequired(true)
|
||||||
}))).addStringOption(_0x524a8e => _0x524a8e.setRequired(true).setName("rating").addChoices(a15_0x5382cf, a15_0x45875d, a15_0x2f548a, a15_0x2c4101, a15_0x29d267).setDescription("Select the rating")),
|
.setName('product')
|
||||||
async 'run'(_0x4e4a33, _0x49b55d) {
|
.setDescription("Select the product")
|
||||||
let {
|
.addChoices(...review_products.map(product => ({
|
||||||
options: _0x566e7c
|
name: product.name,
|
||||||
} = _0x49b55d;
|
value: product.value
|
||||||
let _0xd8faef = _0x566e7c.getString('rating');
|
})))
|
||||||
let _0x4db77b = _0x566e7c.getString('product');
|
)
|
||||||
let _0x4afee7 = review_products.filter(_0x3f06f6 => {
|
.addStringOption(option =>
|
||||||
return _0x4db77b == _0x3f06f6.value;
|
option
|
||||||
});
|
.setRequired(true)
|
||||||
if (_0x4afee7.length == 0x0) {
|
.setName("rating")
|
||||||
|
.addChoices(fiveStars, fourStars, threeStars, twoStars, oneStar)
|
||||||
|
.setDescription("Select the rating")
|
||||||
|
),
|
||||||
|
|
||||||
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
let rating = options.getString('rating');
|
||||||
|
let selectedProduct = options.getString('product');
|
||||||
|
|
||||||
|
let product = review_products.filter(p => selectedProduct === p.value);
|
||||||
|
if (product.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let _0x8464ae = new ModalBuilder().setTitle('Review').setCustomId("modalReview-" + _0x49b55d.id);
|
|
||||||
let _0x59072f = new TextInputBuilder().setRequired(true).setCustomId("review").setLabel("Write a review").setStyle(TextInputStyle.Paragraph);
|
let reviewModal = new ModalBuilder()
|
||||||
let _0x274667 = new ActionRowBuilder().addComponents(_0x59072f);
|
.setTitle('Review')
|
||||||
_0x8464ae.addComponents(_0x274667);
|
.setCustomId(`modalReview-${interaction.id}`);
|
||||||
await _0x49b55d.showModal(_0x8464ae);
|
|
||||||
let _0x2f39e0 = _0x2d88f4 => _0x2d88f4.customId == "modalReview-" + _0x49b55d.id && _0x2d88f4.user.id == _0x49b55d.user.id;
|
let reviewInput = new TextInputBuilder()
|
||||||
const _0x401ecc = {
|
.setRequired(true)
|
||||||
"filter": _0x2f39e0,
|
.setCustomId("review")
|
||||||
time: 900000
|
.setLabel("Write a review")
|
||||||
};
|
.setStyle(TextInputStyle.Paragraph);
|
||||||
_0x49b55d.awaitModalSubmit(_0x401ecc).then(async _0x28f489 => {
|
|
||||||
let _0x386a88 = _0x28f489.fields.getTextInputValue("review");
|
let actionRow = new ActionRowBuilder().addComponents(reviewInput);
|
||||||
let _0x90a60d = await _0x49b55d.guild.channels.fetch(review_channelID)["catch"](_0x49394d => {});
|
reviewModal.addComponents(actionRow);
|
||||||
const _0x1adb9f = {
|
|
||||||
text: "Reviewed At"
|
await interaction.showModal(reviewModal);
|
||||||
};
|
|
||||||
const _0x12102d = {
|
let filter = i => i.customId === `modalReview-${interaction.id}` && i.user.id === interaction.user.id;
|
||||||
"name": "Review",
|
const modalOptions = { filter, time: 900000 };
|
||||||
"value": '```' + _0x386a88 + "```",
|
|
||||||
|
interaction.awaitModalSubmit(modalOptions)
|
||||||
|
.then(async modalInteraction => {
|
||||||
|
let reviewText = modalInteraction.fields.getTextInputValue("review");
|
||||||
|
let reviewChannel = await interaction.guild.channels.fetch(review_channelID).catch(() => {});
|
||||||
|
|
||||||
|
const footerText = { text: "Reviewed At" };
|
||||||
|
const reviewField = {
|
||||||
|
name: "Review",
|
||||||
|
value: '```' + reviewText + '```',
|
||||||
inline: false
|
inline: false
|
||||||
};
|
};
|
||||||
const _0x398baf = {
|
const productField = {
|
||||||
"name": "Product",
|
name: "Product",
|
||||||
"value": "```" + _0x4afee7[0x0].name + '```',
|
value: '```' + product[0].name + '```',
|
||||||
inline: true
|
inline: true
|
||||||
};
|
};
|
||||||
const _0x3e78ae = {
|
const ratingField = {
|
||||||
name: "Rating",
|
name: "Rating",
|
||||||
"value": '```' + _0xd8faef + '```',
|
value: '```' + rating + '```',
|
||||||
"inline": true
|
inline: true
|
||||||
};
|
};
|
||||||
let _0x2ed598 = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setFooter(_0x1adb9f).addFields(_0x12102d, _0x398baf, _0x3e78ae).setAuthor({
|
|
||||||
'name': _0x49b55d.member.displayName + " has reviewed!",
|
let reviewEmbed = new EmbedBuilder()
|
||||||
'iconURL': _0x49b55d.member.displayAvatarURL()
|
.setTimestamp()
|
||||||
|
.setColor(ticket_settings.embed_color)
|
||||||
|
.setFooter(footerText)
|
||||||
|
.addFields(reviewField, productField, ratingField)
|
||||||
|
.setAuthor({
|
||||||
|
name: `${interaction.member.displayName} has reviewed!`,
|
||||||
|
iconURL: interaction.member.displayAvatarURL()
|
||||||
});
|
});
|
||||||
const _0x766aac = {
|
|
||||||
embeds: [_0x2ed598]
|
const reviewMessage = { embeds: [reviewEmbed] };
|
||||||
|
await reviewChannel.send(reviewMessage);
|
||||||
|
|
||||||
|
const replyOptions = {
|
||||||
|
content: "Your review will be posted shortly.",
|
||||||
|
ephemeral: true
|
||||||
};
|
};
|
||||||
await _0x90a60d.send(_0x766aac);
|
|
||||||
const _0x420ad8 = {
|
return modalInteraction.reply(replyOptions).catch(() => {});
|
||||||
"content": "Your review will be posted shortly.",
|
})
|
||||||
"ephemeral": true
|
.catch(() => {});
|
||||||
};
|
|
||||||
return _0x28f489.reply(_0x420ad8)['catch'](_0x1f3c35 => {});
|
|
||||||
})["catch"](_0x23d543 => {});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a15_0x29149d(_0xccaae4) {
|
|
||||||
function _0x257ffd(_0xce7dd5) {
|
|
||||||
if (typeof _0xce7dd5 === 'string') {
|
|
||||||
return function (_0x5517ca) {}.constructor("while (true) {}").apply("counter");
|
|
||||||
} else {
|
|
||||||
if (('' + _0xce7dd5 / _0xce7dd5).length !== 0x1 || _0xce7dd5 % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call('action');
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x257ffd(++_0xce7dd5);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0xccaae4) {
|
|
||||||
return _0x257ffd;
|
|
||||||
} else {
|
|
||||||
_0x257ffd(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x1a9859) {}
|
|
||||||
}
|
|
|
@ -1,53 +1,5 @@
|
||||||
const a16_0x5ea0bd = function () {
|
const { ticket_settings } = require("../config");
|
||||||
let _0x31b5f0 = true;
|
const { query } = require("../helpers/helper");
|
||||||
return function (_0x21dc58, _0x14a801) {
|
|
||||||
const _0x4444c6 = _0x31b5f0 ? function () {
|
|
||||||
if (_0x14a801) {
|
|
||||||
const _0x40e0ca = _0x14a801.apply(_0x21dc58, arguments);
|
|
||||||
_0x14a801 = null;
|
|
||||||
return _0x40e0ca;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x31b5f0 = false;
|
|
||||||
return _0x4444c6;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a16_0x30758b = a16_0x5ea0bd(this, function () {
|
|
||||||
return a16_0x30758b.toString().search("(((.+)+)+)+$").toString().constructor(a16_0x30758b).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a16_0x30758b();
|
|
||||||
const a16_0x15b450 = function () {
|
|
||||||
let _0x6214d = true;
|
|
||||||
return function (_0x1492c7, _0x52b1f8) {
|
|
||||||
const _0x17890f = _0x6214d ? function () {
|
|
||||||
if (_0x52b1f8) {
|
|
||||||
const _0x3e94ad = _0x52b1f8.apply(_0x1492c7, arguments);
|
|
||||||
_0x52b1f8 = null;
|
|
||||||
return _0x3e94ad;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x6214d = false;
|
|
||||||
return _0x17890f;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a16_0x15b450(this, function () {
|
|
||||||
const _0x2fd539 = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x435b57 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x5ee9d3 = a16_0xc4a198("init");
|
|
||||||
if (!_0x2fd539.test(_0x5ee9d3 + "chain") || !_0x435b57.test(_0x5ee9d3 + "input")) {
|
|
||||||
_0x5ee9d3('0');
|
|
||||||
} else {
|
|
||||||
a16_0xc4a198();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
ticket_settings
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
|
||||||
query
|
|
||||||
} = require("../helpers/helper");
|
|
||||||
const {
|
const {
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
PermissionFlagsBits,
|
PermissionFlagsBits,
|
||||||
|
@ -55,66 +7,64 @@ const {
|
||||||
ButtonBuilder,
|
ButtonBuilder,
|
||||||
ActionRowBuilder
|
ActionRowBuilder
|
||||||
} = require("discord.js");
|
} = require("discord.js");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName("send-ticket-message").setDescription("Send a ticket message").addStringOption(_0x373a2d => _0x373a2d.setRequired(false).setName("description").setDescription("Enter a description.")).setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
data: new SlashCommandBuilder()
|
||||||
async 'run'(_0x28592b, _0x2ce1cf) {
|
.setName("send-ticket-message")
|
||||||
let {
|
.setDescription("Send a ticket message")
|
||||||
options: _0x331145
|
.addStringOption(option =>
|
||||||
} = _0x2ce1cf;
|
option
|
||||||
const _0x5862fd = {
|
.setRequired(false)
|
||||||
"ephemeral": true
|
.setName("description")
|
||||||
};
|
.setDescription("Enter a description.")
|
||||||
await _0x2ce1cf.deferReply(_0x5862fd);
|
)
|
||||||
let _0x165176 = _0x331145.getString("description");
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
while (_0x165176?.['includes']('[E]')) {
|
|
||||||
_0x165176 = _0x165176.replace("[E]", "\n");
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
|
||||||
|
const deferOptions = { ephemeral: true };
|
||||||
|
await interaction.deferReply(deferOptions);
|
||||||
|
|
||||||
|
let description = options.getString("description");
|
||||||
|
while (description?.includes('[E]')) {
|
||||||
|
description = description.replace("[E]", "\n");
|
||||||
}
|
}
|
||||||
let _0x5162c1 = new EmbedBuilder().setColor(ticket_settings.embed_color).setThumbnail(ticket_settings.ticket_thumbnail).setDescription("Please use /settings commands first!");
|
|
||||||
let _0x468465 = await query(db, "SELECT * FROM settings WHERE guildID='" + _0x2ce1cf.guildId + "'");
|
let ticketEmbed = new EmbedBuilder()
|
||||||
const _0x1b2ee6 = {
|
.setColor(ticket_settings.embed_color)
|
||||||
"embeds": [_0x5162c1],
|
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||||
"ephemeral": true
|
.setDescription("Please use /settings commands first!");
|
||||||
|
|
||||||
|
let settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||||
|
|
||||||
|
const noSettingsReply = {
|
||||||
|
embeds: [ticketEmbed],
|
||||||
|
ephemeral: true
|
||||||
};
|
};
|
||||||
if (!_0x468465) {
|
|
||||||
return _0x2ce1cf.editReply(_0x1b2ee6);
|
if (!settings) {
|
||||||
|
return interaction.editReply(noSettingsReply);
|
||||||
}
|
}
|
||||||
const _0x25bc63 = {
|
|
||||||
"name": "Ticket Support:"
|
const authorText = { name: "Ticket Support:" };
|
||||||
|
ticketEmbed.setAuthor(authorText);
|
||||||
|
ticketEmbed.setDescription(description || "Click the button below to create a ticket!");
|
||||||
|
|
||||||
|
let createButton = new ButtonBuilder()
|
||||||
|
.setEmoji(ticket_settings.buttoncreateemoji)
|
||||||
|
.setLabel(ticket_settings.buttoncreatelabel)
|
||||||
|
.setStyle(ticket_settings.buttoncreatestyle)
|
||||||
|
.setCustomId("create_ticket");
|
||||||
|
|
||||||
|
let actionRow = new ActionRowBuilder().addComponents(createButton);
|
||||||
|
|
||||||
|
const ticketMessage = {
|
||||||
|
embeds: [ticketEmbed],
|
||||||
|
components: [actionRow]
|
||||||
};
|
};
|
||||||
_0x5162c1.setAuthor(_0x25bc63);
|
|
||||||
_0x5162c1.setDescription(_0x165176 || "Click the button below to create a ticket!");
|
await interaction.channel.send(ticketMessage);
|
||||||
let _0x462f5b = new ButtonBuilder().setEmoji(ticket_settings.buttoncreateemoji).setLabel(ticket_settings.buttoncreatelabel).setStyle(ticket_settings.buttoncreatestyle).setCustomId("create_ticket");
|
return interaction.deleteReply();
|
||||||
let _0x32c52b = new ActionRowBuilder().addComponents(_0x462f5b);
|
|
||||||
const _0xcf2cba = {
|
|
||||||
"embeds": [_0x5162c1],
|
|
||||||
"components": [_0x32c52b]
|
|
||||||
};
|
|
||||||
await _0x2ce1cf.channel.send(_0xcf2cba);
|
|
||||||
return _0x2ce1cf.deleteReply();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a16_0xc4a198(_0x2e79b5) {
|
|
||||||
function _0x4b00b4(_0x5450a4) {
|
|
||||||
if (typeof _0x5450a4 === "string") {
|
|
||||||
return function (_0x156f9f) {}.constructor("while (true) {}").apply("counter");
|
|
||||||
} else {
|
|
||||||
if (('' + _0x5450a4 / _0x5450a4).length !== 0x1 || _0x5450a4 % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call('action');
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x4b00b4(++_0x5450a4);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x2e79b5) {
|
|
||||||
return _0x4b00b4;
|
|
||||||
} else {
|
|
||||||
_0x4b00b4(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x514902) {}
|
|
||||||
}
|
|
|
@ -1,104 +1,55 @@
|
||||||
const a17_0x2d1fb5 = function () {
|
const { embed_color } = require("../config");
|
||||||
let _0x629b06 = true;
|
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||||
return function (_0x10dad2, _0x555db6) {
|
|
||||||
const _0x52c624 = _0x629b06 ? function () {
|
|
||||||
if (_0x555db6) {
|
|
||||||
const _0x322d96 = _0x555db6.apply(_0x10dad2, arguments);
|
|
||||||
_0x555db6 = null;
|
|
||||||
return _0x322d96;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x629b06 = false;
|
|
||||||
return _0x52c624;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a17_0x38fcf1 = a17_0x2d1fb5(this, function () {
|
|
||||||
return a17_0x38fcf1.toString().search("(((.+)+)+)+$").toString().constructor(a17_0x38fcf1).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a17_0x38fcf1();
|
|
||||||
const a17_0x18f4b9 = function () {
|
|
||||||
let _0x2fc1e4 = true;
|
|
||||||
return function (_0x4b3638, _0x33b77b) {
|
|
||||||
const _0x1cc8f0 = _0x2fc1e4 ? function () {
|
|
||||||
if (_0x33b77b) {
|
|
||||||
const _0x155d31 = _0x33b77b.apply(_0x4b3638, arguments);
|
|
||||||
_0x33b77b = null;
|
|
||||||
return _0x155d31;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x2fc1e4 = false;
|
|
||||||
return _0x1cc8f0;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a17_0x18f4b9(this, function () {
|
|
||||||
const _0x4887cf = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x5c14cb = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x21fee2 = a17_0x3155b4("init");
|
|
||||||
if (!_0x4887cf.test(_0x21fee2 + "chain") || !_0x5c14cb.test(_0x21fee2 + 'input')) {
|
|
||||||
_0x21fee2('0');
|
|
||||||
} else {
|
|
||||||
a17_0x3155b4();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
embed_color
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
PermissionFlagsBits,
|
|
||||||
EmbedBuilder
|
|
||||||
} = require("discord.js");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName("settings").setDescription("Set the settings tickets").addRoleOption(_0x1bd6f0 => _0x1bd6f0.setRequired(true).setName("support-role").setDescription("Set the support role for tickets.")).addChannelOption(_0x2fec86 => _0x2fec86.setRequired(true).setName("log-channel").setDescription("Select the channel for transcripts.")).setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
data: new SlashCommandBuilder()
|
||||||
async 'run'(_0x3e99a2, _0x4b4680) {
|
.setName("settings")
|
||||||
let {
|
.setDescription("Set the settings tickets")
|
||||||
options: _0x3d516c
|
.addRoleOption(option =>
|
||||||
} = _0x4b4680;
|
option
|
||||||
const _0x5be46d = {
|
.setRequired(true)
|
||||||
|
.setName("support-role")
|
||||||
|
.setDescription("Set the support role for tickets.")
|
||||||
|
)
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setRequired(true)
|
||||||
|
.setName("log-channel")
|
||||||
|
.setDescription("Select the channel for transcripts.")
|
||||||
|
)
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
|
|
||||||
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
|
||||||
|
const deferOptions = { ephemeral: true };
|
||||||
|
await interaction.deferReply(deferOptions);
|
||||||
|
|
||||||
|
let supportRole = options.getRole("support-role");
|
||||||
|
let logChannel = options.getChannel("log-channel");
|
||||||
|
|
||||||
|
const authorText = { name: interaction.guild.name };
|
||||||
|
const thumbnailOptions = { dynamic: true };
|
||||||
|
|
||||||
|
let settingsEmbed = new EmbedBuilder()
|
||||||
|
.setColor(embed_color)
|
||||||
|
.setAuthor(authorText)
|
||||||
|
.setThumbnail(interaction.guild.iconURL(thumbnailOptions))
|
||||||
|
.setDescription("You successfully change the settings.");
|
||||||
|
|
||||||
|
db.query(`
|
||||||
|
INSERT INTO settings (log_channelID, support_roleID, ticket_counter, guildID)
|
||||||
|
VALUES ('${logChannel.id}', '${supportRole.id}', '0', '${interaction.guildId}')
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
log_channelID='${logChannel.id}',
|
||||||
|
support_roleID='${supportRole.id}'
|
||||||
|
`);
|
||||||
|
|
||||||
|
const replyOptions = {
|
||||||
|
embeds: [settingsEmbed],
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
};
|
};
|
||||||
await _0x4b4680.deferReply(_0x5be46d);
|
|
||||||
let _0x164c0a = _0x3d516c.getRole("support-role");
|
return interaction.editReply(replyOptions);
|
||||||
let _0x24eac8 = _0x3d516c.getChannel("log-channel");
|
|
||||||
const _0xd64bc5 = {
|
|
||||||
name: _0x4b4680.guild.name
|
|
||||||
};
|
|
||||||
const _0x5bcae0 = {
|
|
||||||
dynamic: true
|
|
||||||
};
|
|
||||||
let _0x526490 = new EmbedBuilder().setColor(embed_color).setAuthor(_0xd64bc5).setThumbnail(_0x4b4680.guild.iconURL(_0x5bcae0)).setDescription("You successfully change the settings.");
|
|
||||||
db.query("INSERT INTO settings (log_channelID, support_roleID, ticket_counter, guildID) VALUES ('" + _0x24eac8.id + "', '" + _0x164c0a.id + "', '0', '" + _0x4b4680.guildId + "') ON DUPLICATE KEY UPDATE log_channelID='" + _0x24eac8.id + "', support_roleID='" + _0x164c0a.id + "'");
|
|
||||||
const _0x466f94 = {
|
|
||||||
"embeds": [_0x526490],
|
|
||||||
"ephemeral": true
|
|
||||||
};
|
|
||||||
return _0x4b4680.editReply(_0x466f94);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a17_0x3155b4(_0x1b8f24) {
|
|
||||||
function _0x36d3f4(_0x629fa1) {
|
|
||||||
if (typeof _0x629fa1 === "string") {
|
|
||||||
return function (_0x212aed) {}.constructor("while (true) {}").apply("counter");
|
|
||||||
} else {
|
|
||||||
if (('' + _0x629fa1 / _0x629fa1).length !== 0x1 || _0x629fa1 % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call("action");
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x36d3f4(++_0x629fa1);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x1b8f24) {
|
|
||||||
return _0x36d3f4;
|
|
||||||
} else {
|
|
||||||
_0x36d3f4(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x2924b1) {}
|
|
||||||
}
|
|
|
@ -1,111 +1,48 @@
|
||||||
const a18_0x49d64a = function () {
|
const { support_topics } = require("../config");
|
||||||
let _0x4277a8 = true;
|
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||||
return function (_0x3bdd82, _0x5e5100) {
|
|
||||||
const _0x42b33c = _0x4277a8 ? function () {
|
|
||||||
if (_0x5e5100) {
|
|
||||||
const _0x3ea0fa = _0x5e5100.apply(_0x3bdd82, arguments);
|
|
||||||
_0x5e5100 = null;
|
|
||||||
return _0x3ea0fa;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x4277a8 = false;
|
|
||||||
return _0x42b33c;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
const a18_0xd66b74 = a18_0x49d64a(this, function () {
|
|
||||||
return a18_0xd66b74.toString().search("(((.+)+)+)+$").toString().constructor(a18_0xd66b74).search("(((.+)+)+)+$");
|
|
||||||
});
|
|
||||||
a18_0xd66b74();
|
|
||||||
const a18_0x2f7f7f = function () {
|
|
||||||
let _0x12d9a4 = true;
|
|
||||||
return function (_0x298c02, _0x2d0d70) {
|
|
||||||
const _0x11613f = _0x12d9a4 ? function () {
|
|
||||||
if (_0x2d0d70) {
|
|
||||||
const _0x36cd01 = _0x2d0d70.apply(_0x298c02, arguments);
|
|
||||||
_0x2d0d70 = null;
|
|
||||||
return _0x36cd01;
|
|
||||||
}
|
|
||||||
} : function () {};
|
|
||||||
_0x12d9a4 = false;
|
|
||||||
return _0x11613f;
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(function () {
|
|
||||||
a18_0x2f7f7f(this, function () {
|
|
||||||
const _0x225051 = new RegExp("function *\\( *\\)");
|
|
||||||
const _0x1143ca = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
|
||||||
const _0x14323d = a18_0x45476f("init");
|
|
||||||
if (!_0x225051.test(_0x14323d + "chain") || !_0x1143ca.test(_0x14323d + "input")) {
|
|
||||||
_0x14323d('0');
|
|
||||||
} else {
|
|
||||||
a18_0x45476f();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
})();
|
|
||||||
const {
|
|
||||||
support_topics
|
|
||||||
} = require("../config");
|
|
||||||
const {
|
|
||||||
SlashCommandBuilder,
|
|
||||||
EmbedBuilder
|
|
||||||
} = require("discord.js");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
'data': new SlashCommandBuilder().setName('support').setDescription("Get support topics").addStringOption(_0x48c660 => _0x48c660.setRequired(true).setName("parameter").addChoices(...support_topics.map(_0x20cbe9 => {
|
data: new SlashCommandBuilder()
|
||||||
const _0x113e9a = {
|
.setName('support')
|
||||||
"name": _0x20cbe9.name,
|
.setDescription("Get support topics")
|
||||||
value: _0x20cbe9.value
|
.addStringOption(option =>
|
||||||
};
|
option
|
||||||
return _0x113e9a;
|
.setRequired(true)
|
||||||
})).setDescription("Issue to prompt")),
|
.setName("parameter")
|
||||||
async 'run'(_0x65ac68, _0x503598) {
|
.addChoices(
|
||||||
let {
|
...support_topics.map(topic => ({
|
||||||
options: _0xbc3226
|
name: topic.name,
|
||||||
} = _0x503598;
|
value: topic.value
|
||||||
let _0xb1872e = _0xbc3226.getString('parameter');
|
}))
|
||||||
let _0x533c2a = support_topics.filter(_0x762629 => {
|
)
|
||||||
return _0xb1872e == _0x762629.value;
|
.setDescription("Issue to prompt")
|
||||||
});
|
),
|
||||||
if (_0x533c2a.length == 0x0) {
|
|
||||||
|
async run(interaction) {
|
||||||
|
let { options } = interaction;
|
||||||
|
let selectedTopic = options.getString('parameter');
|
||||||
|
|
||||||
|
let matchedTopic = support_topics.filter(topic => selectedTopic === topic.value);
|
||||||
|
if (matchedTopic.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const _0x2c7590 = {
|
|
||||||
text: "Coded by @onurcansevinc"
|
const footerText = { text: "Coded by @onurcansevinc" };
|
||||||
};
|
let supportEmbed = new EmbedBuilder()
|
||||||
let _0x3e3057 = new EmbedBuilder().setTitle('' + _0x533c2a[0x0].name).setColor("Random").setFooter(_0x2c7590).setDescription('' + _0x533c2a[0x0].response);
|
.setTitle(matchedTopic[0].name)
|
||||||
if (_0x533c2a[0x0].image) {
|
.setColor("Random")
|
||||||
_0x3e3057.setImage(_0x533c2a[0x0].image);
|
.setFooter(footerText)
|
||||||
|
.setDescription(matchedTopic[0].response);
|
||||||
|
|
||||||
|
if (matchedTopic[0].image) {
|
||||||
|
supportEmbed.setImage(matchedTopic[0].image);
|
||||||
}
|
}
|
||||||
if (_0x533c2a[0x0].thumbnail) {
|
|
||||||
_0x3e3057.setThumbnail(_0x533c2a[0x0].thumbnail);
|
if (matchedTopic[0].thumbnail) {
|
||||||
|
supportEmbed.setThumbnail(matchedTopic[0].thumbnail);
|
||||||
}
|
}
|
||||||
const _0x29dd77 = {
|
|
||||||
embeds: [_0x3e3057]
|
const replyOptions = { embeds: [supportEmbed] };
|
||||||
};
|
return interaction.reply(replyOptions);
|
||||||
return _0x503598.reply(_0x29dd77);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function a18_0x45476f(_0x57b4e6) {
|
|
||||||
function _0x2c3bcc(_0x1b4d6b) {
|
|
||||||
if (typeof _0x1b4d6b === "string") {
|
|
||||||
return function (_0x328bdb) {}.constructor("while (true) {}").apply('counter');
|
|
||||||
} else {
|
|
||||||
if (('' + _0x1b4d6b / _0x1b4d6b).length !== 0x1 || _0x1b4d6b % 0x14 === 0x0) {
|
|
||||||
(function () {
|
|
||||||
return true;
|
|
||||||
}).constructor("debugger").call("action");
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
return false;
|
|
||||||
}).constructor("debugger").apply("stateObject");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_0x2c3bcc(++_0x1b4d6b);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (_0x57b4e6) {
|
|
||||||
return _0x2c3bcc;
|
|
||||||
} else {
|
|
||||||
_0x2c3bcc(0x0);
|
|
||||||
}
|
|
||||||
} catch (_0x2a85e2) {}
|
|
||||||
}
|
|
Loading…
Reference in a new issue