Compare commits
1 commit
main
...
renovate/c
Author | SHA1 | Date | |
---|---|---|---|
7f3cc6a266 |
25 changed files with 2109 additions and 1369 deletions
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
|
@ -1,8 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="ASK" />
|
||||
<option name="description" value="" />
|
||||
<option name="theme" value="material" />
|
||||
<option name="button1Title" value="" />
|
||||
<option name="button1Url" value="" />
|
||||
<option name="button2Title" value="" />
|
||||
<option name="button2Url" value="" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Discord_API_Bot.iml" filepath="$PROJECT_DIR$/.idea/Discord_API_Bot.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
264
helpers/api.js
264
helpers/api.js
|
@ -1,141 +1,189 @@
|
|||
const a0_0x1c225b = function () {
|
||||
let _0x26ff6f = true;
|
||||
return function (_0x3098f9, _0x33f4a0) {
|
||||
const _0x4039b1 = _0x26ff6f ? function () {
|
||||
if (_0x33f4a0) {
|
||||
const _0x1febc4 = _0x33f4a0.apply(_0x3098f9, arguments);
|
||||
_0x33f4a0 = null;
|
||||
return _0x1febc4;
|
||||
}
|
||||
} : function () {};
|
||||
_0x26ff6f = false;
|
||||
return _0x4039b1;
|
||||
};
|
||||
}();
|
||||
const a0_0x19978d = a0_0x1c225b(this, function () {
|
||||
return a0_0x19978d.toString().search("(((.+)+)+)+$").toString().constructor(a0_0x19978d).search("(((.+)+)+)+$");
|
||||
});
|
||||
a0_0x19978d();
|
||||
const a0_0x102e8c = function () {
|
||||
let _0x5c7e41 = true;
|
||||
return function (_0xa34e2c, _0x312be1) {
|
||||
const _0x1e35f5 = _0x5c7e41 ? function () {
|
||||
if (_0x312be1) {
|
||||
const _0x245e03 = _0x312be1.apply(_0xa34e2c, arguments);
|
||||
_0x312be1 = null;
|
||||
return _0x245e03;
|
||||
}
|
||||
} : function () {};
|
||||
_0x5c7e41 = false;
|
||||
return _0x1e35f5;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a0_0x102e8c(this, function () {
|
||||
const _0xbf92e = new RegExp("function *\\( *\\)");
|
||||
const _0x35370f = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x339327 = a0_0x4ec4cc("init");
|
||||
if (!_0xbf92e.test(_0x339327 + 'chain') || !_0x35370f.test(_0x339327 + 'input')) {
|
||||
_0x339327('0');
|
||||
} else {
|
||||
a0_0x4ec4cc();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const axios = require("axios");
|
||||
const { api_url, api_token } = require("../config");
|
||||
|
||||
const {
|
||||
api_url,
|
||||
api_token
|
||||
} = require("../config");
|
||||
module.exports = {
|
||||
getUser: async function (email) {
|
||||
const headers = {
|
||||
Authorization: `Bearer ${api_token}`
|
||||
'getUser': async function (_0x3587a7) {
|
||||
const _0x18e41e = {
|
||||
Authorization: "Bearer " + api_token
|
||||
};
|
||||
const options = {
|
||||
method: "GET",
|
||||
url: `${api_url}/users?filter[email]=${email}&include=orders`,
|
||||
headers: headers
|
||||
const _0x50a9eb = {
|
||||
"method": "GET",
|
||||
"url": api_url + "/users?filter[email]=" + _0x3587a7 + "&include=orders",
|
||||
"headers": _0x18e41e
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.request(options)
|
||||
.then(response => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
resolve(false);
|
||||
});
|
||||
return new Promise(function (_0x328bf9, _0x1b762c) {
|
||||
axios.request(_0x50a9eb).then(_0xf8546a => {
|
||||
_0x328bf9(_0xf8546a.data);
|
||||
})["catch"](_0x1e9c4a => {
|
||||
_0x328bf9(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getDiscordUser: async function (discordId) {
|
||||
const headers = {
|
||||
Authorization: `Bearer ${api_token}`
|
||||
'getDiscordUser': async function (_0x17a450) {
|
||||
const _0x108855 = {
|
||||
Authorization: "Bearer " + api_token
|
||||
};
|
||||
const options = {
|
||||
const _0x14dab5 = {
|
||||
method: "GET",
|
||||
url: `${api_url}/oauth-connections?filter[data->id]=${discordId}`,
|
||||
headers: headers
|
||||
"url": api_url + "/oauth-connections?filter[data->id]=" + _0x17a450,
|
||||
"headers": _0x108855
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.request(options)
|
||||
.then(response => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
resolve(false);
|
||||
});
|
||||
return new Promise(function (_0x2fe4ec, _0x11e844) {
|
||||
axios.request(_0x14dab5).then(_0x54a58b => {
|
||||
_0x2fe4ec(_0x54a58b.data);
|
||||
})["catch"](_0xa96b95 => {
|
||||
_0x2fe4ec(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getNewOauths: async function () {
|
||||
const headers = {
|
||||
Authorization: `Bearer ${api_token}`
|
||||
'getNewOauths': async function () {
|
||||
const _0x447e11 = {
|
||||
Authorization: "Bearer " + api_token
|
||||
};
|
||||
const options = {
|
||||
const _0x239a7a = {
|
||||
method: "GET",
|
||||
url: `${api_url}/oauth-connections?date=3days`,
|
||||
headers: headers
|
||||
"url": api_url + "/oauth-connections?date=3days",
|
||||
headers: _0x447e11
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.request(options)
|
||||
.then(response => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
resolve(false);
|
||||
});
|
||||
return new Promise(function (_0x1a2033, _0x3efbb7) {
|
||||
axios.request(_0x239a7a).then(_0x11e80d => {
|
||||
_0x1a2033(_0x11e80d.data);
|
||||
})["catch"](_0x432895 => {
|
||||
_0x1a2033(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getOauthUsers: async function () {
|
||||
let page = 1;
|
||||
let oauthUsers = [];
|
||||
let hasMorePages = true;
|
||||
|
||||
while (hasMorePages) {
|
||||
const data = await pagination(`oauth-connections?page=${page}`);
|
||||
oauthUsers.push(...data.data);
|
||||
|
||||
if (!data.next_page_url) {
|
||||
hasMorePages = false;
|
||||
'getOauthUsers': async function () {
|
||||
let _0x4450b1 = 0x1;
|
||||
let _0x51c057 = [];
|
||||
let _0x1795bb = false;
|
||||
while (!_0x1795bb) {
|
||||
let _0x1a365c = await pagination("oauth-connections?page=" + _0x4450b1);
|
||||
_0x51c057.push(..._0x1a365c.data);
|
||||
if (!_0x1a365c.next_page_url) {
|
||||
_0x1795bb = true;
|
||||
} else {
|
||||
page = data.next_page_url.split("page=")[1];
|
||||
_0x4450b1 = _0x1a365c.next_page_url.split("page=")[0x1];
|
||||
}
|
||||
}
|
||||
|
||||
return oauthUsers;
|
||||
return _0x51c057;
|
||||
},
|
||||
|
||||
getActiveOrders: async function () {
|
||||
let page = 1;
|
||||
let activeOrders = [];
|
||||
let hasMorePages = true;
|
||||
|
||||
while (hasMorePages) {
|
||||
const data = await pagination(`orders?filter[status]=active&page=${page}`);
|
||||
activeOrders.push(...data.data);
|
||||
|
||||
if (!data.next_page_url) {
|
||||
hasMorePages = false;
|
||||
'getActiveOrders': async function () {
|
||||
let _0x23c335 = 0x1;
|
||||
let _0x3becc5 = [];
|
||||
let _0x55415c = false;
|
||||
while (!_0x55415c) {
|
||||
let _0x43ec80 = await pagination("orders?filter[status]=active&page=" + _0x23c335);
|
||||
_0x3becc5.push(..._0x43ec80.data);
|
||||
if (!_0x43ec80.next_page_url) {
|
||||
_0x55415c = true;
|
||||
} else {
|
||||
page = data.next_page_url.split('page=')[1];
|
||||
_0x23c335 = _0x43ec80.next_page_url.split('page=')[0x1];
|
||||
}
|
||||
}
|
||||
|
||||
return activeOrders;
|
||||
return _0x3becc5;
|
||||
},
|
||||
|
||||
getAllUsers: async function () {
|
||||
let page = 1;
|
||||
let allUsers = [];
|
||||
let hasMorePages = true;
|
||||
|
||||
while (hasMorePages) {
|
||||
const data = await pagination(`users?page=${page}`);
|
||||
allUsers.push(...data.data);
|
||||
|
||||
if (!data.next_page_url) {
|
||||
hasMorePages = false;
|
||||
'getAllUsers': async function () {
|
||||
let _0x66b7e9 = 0x1;
|
||||
let _0x4dd437 = [];
|
||||
let _0x3d3b75 = false;
|
||||
while (!_0x3d3b75) {
|
||||
let _0x3e0308 = await pagination("users?page=" + _0x66b7e9);
|
||||
_0x4dd437.push(..._0x3e0308.data);
|
||||
if (!_0x3e0308.next_page_url) {
|
||||
_0x3d3b75 = true;
|
||||
} else {
|
||||
page = data.next_page_url.split("page=")[1];
|
||||
_0x66b7e9 = _0x3e0308.next_page_url.split("page=")[0x1];
|
||||
}
|
||||
}
|
||||
|
||||
return allUsers;
|
||||
return _0x4dd437;
|
||||
}
|
||||
};
|
||||
|
||||
async function pagination(endpoint) {
|
||||
const headers = {
|
||||
Authorization: `Bearer ${api_token}`
|
||||
async function pagination(_0x555d30) {
|
||||
const _0x24eb29 = {
|
||||
Authorization: "Bearer " + api_token
|
||||
};
|
||||
const options = {
|
||||
method: "GET",
|
||||
url: `${api_url}/${endpoint}`,
|
||||
headers: headers
|
||||
const _0x1d8596 = {
|
||||
"method": "GET",
|
||||
"url": api_url + '/' + _0x555d30,
|
||||
"headers": _0x24eb29
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.request(options)
|
||||
.then(async response => {
|
||||
return resolve(response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
resolve(false);
|
||||
});
|
||||
return new Promise(function (_0x69b493, _0x598a19) {
|
||||
axios.request(_0x1d8596).then(async _0x571fc2 => {
|
||||
return _0x69b493(_0x571fc2.data);
|
||||
})['catch'](_0x584f23 => {
|
||||
_0x69b493(false);
|
||||
});
|
||||
});
|
||||
}
|
||||
function a0_0x4ec4cc(_0x3b9e64) {
|
||||
function _0x36cc4c(_0xf1d4d7) {
|
||||
if (typeof _0xf1d4d7 === "string") {
|
||||
return function (_0x15b4cd) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0xf1d4d7 / _0xf1d4d7).length !== 0x1 || _0xf1d4d7 % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x36cc4c(++_0xf1d4d7);
|
||||
}
|
||||
try {
|
||||
if (_0x3b9e64) {
|
||||
return _0x36cc4c;
|
||||
} else {
|
||||
_0x36cc4c(0x0);
|
||||
}
|
||||
} catch (_0x3c7595) {}
|
||||
}
|
|
@ -1,129 +1,173 @@
|
|||
const { query, queryMulti } = require("./helper");
|
||||
const { ticket_settings } = require("../config");
|
||||
const a1_0xb9c6e4 = function () {
|
||||
let _0x4a5a7b = true;
|
||||
return function (_0x2db11c, _0x51979f) {
|
||||
const _0x2415df = _0x4a5a7b ? function () {
|
||||
if (_0x51979f) {
|
||||
const _0x1fc528 = _0x51979f.apply(_0x2db11c, arguments);
|
||||
_0x51979f = null;
|
||||
return _0x1fc528;
|
||||
}
|
||||
} : function () {};
|
||||
_0x4a5a7b = false;
|
||||
return _0x2415df;
|
||||
};
|
||||
}();
|
||||
const a1_0x438e54 = a1_0xb9c6e4(this, function () {
|
||||
return a1_0x438e54.toString().search("(((.+)+)+)+$").toString().constructor(a1_0x438e54).search("(((.+)+)+)+$");
|
||||
});
|
||||
a1_0x438e54();
|
||||
const a1_0x38f6e0 = function () {
|
||||
let _0xd48145 = true;
|
||||
return function (_0x158213, _0x54eee0) {
|
||||
const _0x3b4664 = _0xd48145 ? function () {
|
||||
if (_0x54eee0) {
|
||||
const _0x51a7d8 = _0x54eee0.apply(_0x158213, arguments);
|
||||
_0x54eee0 = null;
|
||||
return _0x51a7d8;
|
||||
}
|
||||
} : function () {};
|
||||
_0xd48145 = false;
|
||||
return _0x3b4664;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a1_0x38f6e0(this, function () {
|
||||
const _0x4acb7b = new RegExp("function *\\( *\\)");
|
||||
const _0xbeebc = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x409ab9 = a1_0x1992bc("init");
|
||||
if (!_0x4acb7b.test(_0x409ab9 + "chain") || !_0xbeebc.test(_0x409ab9 + "input")) {
|
||||
_0x409ab9('0');
|
||||
} else {
|
||||
a1_0x1992bc();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const {
|
||||
query,
|
||||
queryMulti
|
||||
} = require("./helper");
|
||||
const {
|
||||
ticket_settings
|
||||
} = require("../config");
|
||||
const {
|
||||
ActionRowBuilder,
|
||||
EmbedBuilder,
|
||||
ButtonBuilder,
|
||||
StringSelectMenuBuilder
|
||||
} = require("discord.js");
|
||||
|
||||
module.exports = async (client, db) => {
|
||||
client.on("interactionCreate", async interaction => {
|
||||
if (!interaction.customId || interaction.customId !== "create_ticket") {
|
||||
module.exports = async (_0x5ae8c9, _0xd5d02f) => {
|
||||
_0x5ae8c9.on("interactionCreate", async _0x3f602c => {
|
||||
if (!_0x3f602c.customId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const options = await queryMulti(db, `SELECT * FROM options WHERE guildID='${interaction.guildId}'`);
|
||||
|
||||
if (options) {
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
|
||||
const selectMenu = new StringSelectMenuBuilder()
|
||||
.setCustomId("newTicket")
|
||||
.setPlaceholder("Choose a reason for the ticket");
|
||||
|
||||
options.forEach((option, index) => {
|
||||
selectMenu.addOptions([
|
||||
{
|
||||
label: option.name,
|
||||
description: option.description || "No reason",
|
||||
value: `newTicket_${option.id}`
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(selectMenu);
|
||||
|
||||
return interaction.editReply({
|
||||
content: "What will be the reason for the ticket?",
|
||||
components: [actionRow],
|
||||
if (_0x3f602c.customId !== "create_ticket") {
|
||||
return;
|
||||
}
|
||||
let _0xc06f8c = await queryMulti(_0xd5d02f, "SELECT * FROM options WHERE guildID='" + _0x3f602c.guildId + "'");
|
||||
if (_0xc06f8c) {
|
||||
const _0x24674e = {
|
||||
ephemeral: true
|
||||
};
|
||||
await _0x3f602c.deferReply(_0x24674e);
|
||||
let _0x679c11 = new StringSelectMenuBuilder().setCustomId("newTicket").setPlaceholder("Choose a reason for the ticket");
|
||||
_0xc06f8c.forEach((_0x240712, _0x591b97) => {
|
||||
const _0x54eb52 = {
|
||||
"label": _0x240712.name,
|
||||
description: _0x240712.description || "No reason",
|
||||
"value": "newTicket_" + _0x240712.id
|
||||
};
|
||||
_0x679c11.addOptions([_0x54eb52]);
|
||||
});
|
||||
let _0x1c2a52 = new ActionRowBuilder().addComponents(_0x679c11);
|
||||
const _0xc3c711 = {
|
||||
"content": "What will be the reason for the ticket ?",
|
||||
components: [_0x1c2a52],
|
||||
ephemeral: true
|
||||
};
|
||||
return _0x3f602c.editReply(_0xc3c711);
|
||||
} else {
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setDescription(ticket_settings.ticket_message.replace('{user}', interaction.user))
|
||||
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||
.setAuthor({
|
||||
name: interaction.user.tag,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
});
|
||||
|
||||
const existingTicket = await query(
|
||||
db,
|
||||
`SELECT * FROM tickets WHERE status='open' AND userID='${interaction.user.id}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
const existingChannel = client.channels.cache.get(existingTicket?.channelID);
|
||||
|
||||
if (existingTicket && existingChannel) {
|
||||
return interaction.editReply({
|
||||
content: `You already have a ticket! Please check the ${existingChannel}`,
|
||||
ephemeral: true
|
||||
const _0x1fe242 = {
|
||||
ephemeral: true
|
||||
};
|
||||
await _0x3f602c.deferReply(_0x1fe242);
|
||||
let _0x5533ee = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setDescription(ticket_settings.ticket_message.replace('{user}', _0x3f602c.user)).setThumbnail(ticket_settings.ticket_thumbnail).setAuthor({
|
||||
'name': _0x3f602c.user.tag,
|
||||
'iconURL': _0x3f602c.user.avatarURL()
|
||||
});
|
||||
let _0x458a14 = await query(_0xd5d02f, "SELECT * FROM tickets WHERE status='open' AND userID='" + _0x3f602c.user.id + "' AND guildID='" + _0x3f602c.guildId + "'");
|
||||
let _0x14a07f = _0x5ae8c9.channels.cache.get(_0x458a14?.['channelID']);
|
||||
if (_0x458a14 && _0x14a07f) {
|
||||
return _0x3f602c.editReply({
|
||||
'content': "You already have a ticket! Please check the " + _0x14a07f,
|
||||
'ephemeral': true
|
||||
});
|
||||
}
|
||||
|
||||
const settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||
db.query(`UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='${interaction.guildId}'`);
|
||||
|
||||
const permissions = [
|
||||
{
|
||||
id: interaction.guildId,
|
||||
deny: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: interaction.member.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: client.user.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: settings?.support_roleID,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
}
|
||||
];
|
||||
|
||||
const channel = await interaction.guild.channels.create({
|
||||
name: `ticket-${pad(settings.ticket_counter + 1, 4)}`,
|
||||
topic: `#Ticket | From ${interaction.user.username}`,
|
||||
permissionOverwrites: permissions
|
||||
let _0x435321 = await query(_0xd5d02f, "SELECT * FROM settings WHERE guildID='" + _0x3f602c.guildId + "'");
|
||||
_0xd5d02f.query("UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='" + _0x3f602c.guildId + "'");
|
||||
const _0x141566 = {
|
||||
id: _0x5ae8c9.user.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
};
|
||||
_0x14a07f = await _0x3f602c.guild.channels.create({
|
||||
'name': "ticket-" + pad(_0x435321.ticket_counter + 0x1, 0x4),
|
||||
'topic': "#Ticket | From " + _0x3f602c.user.username,
|
||||
'permissionOverwrites': [{
|
||||
'id': _0x3f602c.guildId,
|
||||
'deny': ["ViewChannel", "SendMessages"]
|
||||
}, {
|
||||
'id': _0x3f602c.member.id,
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}, _0x141566, {
|
||||
'id': _0x435321?.["support_roleID"],
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}]
|
||||
});
|
||||
|
||||
const closeButton = new ButtonBuilder()
|
||||
.setEmoji(ticket_settings.buttoncloseemoji)
|
||||
.setLabel(ticket_settings.buttoncloselabel)
|
||||
.setStyle(ticket_settings.buttonclosestyle)
|
||||
.setCustomId("close_ticket");
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(closeButton);
|
||||
|
||||
await channel.send({
|
||||
content: `<@&${settings?.support_roleID}>`,
|
||||
embeds: [embed],
|
||||
components: [actionRow]
|
||||
});
|
||||
|
||||
db.query(
|
||||
"INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)",
|
||||
[pad(settings.ticket_counter + 1, 4), 'open', interaction.user.id, interaction.guildId, channel.id]
|
||||
);
|
||||
|
||||
return interaction.editReply({
|
||||
content: `You successfully created a ticket! Please check the ${channel}`,
|
||||
let _0x146465 = new ButtonBuilder().setEmoji(ticket_settings.buttoncloseemoji).setLabel(ticket_settings.buttoncloselabel).setStyle(ticket_settings.buttonclosestyle).setCustomId("close_ticket");
|
||||
let _0x6f081e = new ActionRowBuilder().addComponents(_0x146465);
|
||||
const _0x1568a7 = {
|
||||
content: "<@&" + _0x435321?.["support_roleID"] + '>',
|
||||
embeds: [_0x5533ee],
|
||||
"components": [_0x6f081e]
|
||||
};
|
||||
await _0x14a07f.send(_0x1568a7);
|
||||
_0xd5d02f.query("INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)", [pad(_0x435321.ticket_counter + 0x1, 0x4), 'open', _0x3f602c.user.id, _0x3f602c.guildId, _0x14a07f.id]);
|
||||
const _0x344361 = {
|
||||
"content": "You successfully created a ticket! Please check the " + _0x14a07f,
|
||||
ephemeral: true
|
||||
});
|
||||
};
|
||||
return _0x3f602c.editReply(_0x344361);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function pad(num, size) {
|
||||
let numStr = num.toString();
|
||||
while (numStr.length < size) {
|
||||
numStr = '0' + numStr;
|
||||
function pad(_0x334865, _0x59ae18) {
|
||||
_0x334865 = _0x334865.toString();
|
||||
while (_0x334865.length < _0x59ae18) {
|
||||
_0x334865 = '0' + _0x334865;
|
||||
}
|
||||
return numStr;
|
||||
return _0x334865;
|
||||
}
|
||||
function a1_0x1992bc(_0x25bcd5) {
|
||||
function _0x2ea995(_0x32765f) {
|
||||
if (typeof _0x32765f === 'string') {
|
||||
return function (_0x36ced0) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x32765f / _0x32765f).length !== 0x1 || _0x32765f % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x2ea995(++_0x32765f);
|
||||
}
|
||||
try {
|
||||
if (_0x25bcd5) {
|
||||
return _0x2ea995;
|
||||
} else {
|
||||
_0x2ea995(0x0);
|
||||
}
|
||||
} catch (_0xa73e8) {}
|
||||
}
|
207
helpers/cron.js
207
helpers/cron.js
|
@ -1,116 +1,169 @@
|
|||
const a2_0x169aa3 = function () {
|
||||
let _0x51ee3c = true;
|
||||
return function (_0x1b5fb3, _0x19916f) {
|
||||
const _0x1d2c7c = _0x51ee3c ? function () {
|
||||
if (_0x19916f) {
|
||||
const _0x2cd5a2 = _0x19916f.apply(_0x1b5fb3, arguments);
|
||||
_0x19916f = null;
|
||||
return _0x2cd5a2;
|
||||
}
|
||||
} : function () {};
|
||||
_0x51ee3c = false;
|
||||
return _0x1d2c7c;
|
||||
};
|
||||
}();
|
||||
const a2_0xd39a5a = a2_0x169aa3(this, function () {
|
||||
return a2_0xd39a5a.toString().search("(((.+)+)+)+$").toString().constructor(a2_0xd39a5a).search("(((.+)+)+)+$");
|
||||
});
|
||||
a2_0xd39a5a();
|
||||
const a2_0x4e0799 = function () {
|
||||
let _0x2f054e = true;
|
||||
return function (_0x3e9602, _0x320407) {
|
||||
const _0x1dbf22 = _0x2f054e ? function () {
|
||||
if (_0x320407) {
|
||||
const _0x117310 = _0x320407.apply(_0x3e9602, arguments);
|
||||
_0x320407 = null;
|
||||
return _0x117310;
|
||||
}
|
||||
} : function () {};
|
||||
_0x2f054e = false;
|
||||
return _0x1dbf22;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a2_0x4e0799(this, function () {
|
||||
const _0x3ee9d4 = new RegExp("function *\\( *\\)");
|
||||
const _0x261b6c = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0xb9a3 = a2_0x4716e7('init');
|
||||
if (!_0x3ee9d4.test(_0xb9a3 + "chain") || !_0x261b6c.test(_0xb9a3 + "input")) {
|
||||
_0xb9a3('0');
|
||||
} else {
|
||||
a2_0x4716e7();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const api = require("./api");
|
||||
const { guild_id, api_role_id, package_roles } = require("../config");
|
||||
|
||||
const {
|
||||
guild_id,
|
||||
api_role_id,
|
||||
package_roles
|
||||
} = require("../config");
|
||||
const users = {};
|
||||
|
||||
module.exports = async client => {
|
||||
const guild = await client.guilds.fetch(guild_id).catch(() => {});
|
||||
if (!guild) {
|
||||
module.exports = async _0x2bfb16 => {
|
||||
const _0x2adaa9 = await _0x2bfb16.guilds.fetch(guild_id)["catch"](_0x5751d0 => {});
|
||||
if (!_0x2adaa9) {
|
||||
return;
|
||||
}
|
||||
|
||||
let oauthUsers = await api.getOauthUsers();
|
||||
oauthUsers.forEach(user => {
|
||||
users[user.user_id] = user.data.id;
|
||||
let _0x212782 = await api.getOauthUsers();
|
||||
_0x212782.forEach(_0x70d746 => {
|
||||
users[_0x70d746.user_id] = _0x70d746.data.id;
|
||||
});
|
||||
|
||||
checkNewOauths();
|
||||
async function checkNewOauths() {
|
||||
setTimeout(checkNewOauths, 120000);
|
||||
const newOauths = await api.getNewOauths();
|
||||
if (!newOauths) {
|
||||
_0xc3192a();
|
||||
async function _0xc3192a() {
|
||||
setTimeout(_0xc3192a, 120000);
|
||||
let _0x2f80b5 = await api.getNewOauths();
|
||||
if (!_0x2f80b5) {
|
||||
return;
|
||||
}
|
||||
|
||||
newOauths.data.forEach(async oauth => {
|
||||
users[oauth.user_id] = oauth.data.id;
|
||||
const member = await guild.members.fetch(oauth.data.id).catch(() => {});
|
||||
if (!member) {
|
||||
_0x2f80b5.data.forEach(async _0x5a41c5 => {
|
||||
users[_0x5a41c5.user_id] = _0x5a41c5.data.id;
|
||||
let _0x86b501 = await _0x2adaa9.members.fetch(_0x5a41c5.data.id)['catch'](_0x1db7d6 => {});
|
||||
if (!_0x86b501) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (member.roles.cache.has(api_role_id)) {
|
||||
if (_0x86b501.roles.cache.has(api_role_id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return member.roles.add(api_role_id).catch(() => {});
|
||||
return _0x86b501.roles.add(api_role_id)["catch"](_0x3ad98e => {});
|
||||
});
|
||||
}
|
||||
|
||||
checkActiveOrders();
|
||||
async function checkActiveOrders() {
|
||||
setTimeout(checkActiveOrders, 300000);
|
||||
const activeOrders = await api.getActiveOrders();
|
||||
if (!activeOrders) {
|
||||
_0x352284();
|
||||
async function _0x352284() {
|
||||
setTimeout(_0x352284, 300000);
|
||||
let _0x54df73 = await api.getActiveOrders();
|
||||
if (!_0x54df73) {
|
||||
return;
|
||||
}
|
||||
|
||||
activeOrders.forEach(async order => {
|
||||
const discordId = users[order.user_id];
|
||||
if (!discordId) {
|
||||
_0x54df73.forEach(async _0x1bc8eb => {
|
||||
let _0xd8d4d6 = users[_0x1bc8eb.user_id];
|
||||
if (!_0xd8d4d6) {
|
||||
return;
|
||||
}
|
||||
|
||||
const member = await guild.members.fetch(discordId).catch(() => {});
|
||||
if (!member) {
|
||||
let _0x27c968 = await _0x2adaa9.members.fetch(_0xd8d4d6)["catch"](_0xfc46f => {});
|
||||
if (!_0x27c968) {
|
||||
return;
|
||||
}
|
||||
|
||||
const packageRole = package_roles.find(role => role.packageID === order.package_id);
|
||||
if (!packageRole) {
|
||||
let _0x1a17bf = package_roles.filter(_0x43ee6e => {
|
||||
return _0x43ee6e.packageID == _0x1bc8eb.package_id;
|
||||
})?.[0x0];
|
||||
if (!_0x1a17bf) {
|
||||
return;
|
||||
}
|
||||
|
||||
return member.roles.add(packageRole.roleID).catch(() => {});
|
||||
return _0x27c968.roles.add(_0x1a17bf.roleID)['catch'](_0x54ff9c => {});
|
||||
});
|
||||
}
|
||||
|
||||
checkPackageRoles();
|
||||
async function checkPackageRoles() {
|
||||
setTimeout(checkPackageRoles, 1800000);
|
||||
|
||||
for (const packageRole of package_roles) {
|
||||
const role = await guild.roles.fetch(packageRole.roleID).catch(() => {
|
||||
_0x1603d3();
|
||||
async function _0x1603d3() {
|
||||
setTimeout(_0x1603d3, 1800000);
|
||||
package_roles.forEach(async _0x34bf1d => {
|
||||
let _0x1a2632 = await _0x2adaa9.roles.fetch(_0x34bf1d.roleID)["catch"](_0x3b05eb => {
|
||||
console.log("Role not found.");
|
||||
});
|
||||
if (!role) {
|
||||
continue;
|
||||
if (!_0x1a2632) {
|
||||
return;
|
||||
}
|
||||
|
||||
const memberIds = role.members.keys();
|
||||
if (memberIds.size === 0) {
|
||||
continue;
|
||||
let _0x8dd2f2 = _0x1a2632.members.keys();
|
||||
if (_0x8dd2f2.size == 0x0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const memberId of memberIds) {
|
||||
const oauthUser = oauthUsers.find(user => user.data.id === memberId);
|
||||
if (!oauthUser) {
|
||||
for (const _0x56650c of _0x8dd2f2) {
|
||||
let _0x658564 = _0x212782.filter(_0x1db0da => _0x1db0da.data.id == _0x56650c)?.[0x0];
|
||||
if (!_0x658564) {
|
||||
continue;
|
||||
}
|
||||
|
||||
await delay(5000);
|
||||
const apiUser = await api.getUser(oauthUser.email);
|
||||
if (!apiUser || apiUser.data.length === 0) {
|
||||
let _0x3707a4 = await api.getUser(_0x658564.email);
|
||||
if (!_0x3707a4 || _0x3707a4.data.length == 0x0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const activeOrder = apiUser?.data[0]?.orders.find(order => {
|
||||
return order.package_id === packageRole.packageID && order.status === "active";
|
||||
});
|
||||
|
||||
if (!activeOrder) {
|
||||
const member = await guild.members.fetch(memberId).catch(() => {});
|
||||
if (member) {
|
||||
let _0x41f7bd = _0x3707a4?.["data"][0x0]?.["orders"]['filter'](_0x3277fc => {
|
||||
return _0x3277fc.package_id == _0x34bf1d.packageID && _0x3277fc.status == "active";
|
||||
})?.[0x0];
|
||||
if (!_0x41f7bd) {
|
||||
let _0x483ad1 = await _0x2adaa9.members.fetch(_0x56650c)["catch"](_0x364b6a => {});
|
||||
if (_0x483ad1) {
|
||||
await delay(5000);
|
||||
await member.roles.remove(packageRole.roleID).catch(() => {
|
||||
console.log("Role couldn't be found.");
|
||||
await _0x483ad1.roles.remove(_0x34bf1d.roleID)['catch'](_0x3a7f5f => {
|
||||
console.log("Role couldn't found.");
|
||||
});
|
||||
console.log(`Removed ${role.name} from ${member.displayName}`);
|
||||
console.log("Removed " + _0x1a2632.name + " from " + _0x483ad1.displayName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
const delay = _0x4f18b0 => new Promise(_0x59dc75 => setTimeout(_0x59dc75, _0x4f18b0));
|
||||
function a2_0x4716e7(_0x582940) {
|
||||
function _0x20350a(_0x2252ba) {
|
||||
if (typeof _0x2252ba === "string") {
|
||||
return function (_0x4559e3) {}.constructor("while (true) {}").apply('counter');
|
||||
} else if (('' + _0x2252ba / _0x2252ba).length !== 0x1 || _0x2252ba % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call('action');
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
_0x20350a(++_0x2252ba);
|
||||
}
|
||||
try {
|
||||
if (_0x582940) {
|
||||
return _0x20350a;
|
||||
} else {
|
||||
_0x20350a(0x0);
|
||||
}
|
||||
} catch (_0x28989b) {}
|
||||
}
|
|
@ -1,33 +1,99 @@
|
|||
var a3_0x57f3db = function () {
|
||||
var _0x17256c = true;
|
||||
return function (_0x15b4d6, _0x38152f) {
|
||||
var _0x5c944f = _0x17256c ? function () {
|
||||
if (_0x38152f) {
|
||||
var _0x26b6b9 = _0x38152f.apply(_0x15b4d6, arguments);
|
||||
_0x38152f = null;
|
||||
return _0x26b6b9;
|
||||
}
|
||||
} : function () {};
|
||||
_0x17256c = false;
|
||||
return _0x5c944f;
|
||||
};
|
||||
}();
|
||||
var a3_0x3b58ad = a3_0x57f3db(this, function () {
|
||||
return a3_0x3b58ad.toString().search("(((.+)+)+)+$").toString().constructor(a3_0x3b58ad).search("(((.+)+)+)+$");
|
||||
});
|
||||
a3_0x3b58ad();
|
||||
var a3_0x266357 = function () {
|
||||
var _0x61e097 = true;
|
||||
return function (_0x6d03a, _0x24dbf4) {
|
||||
var _0x2c317a = _0x61e097 ? function () {
|
||||
if (_0x24dbf4) {
|
||||
var _0x217a12 = _0x24dbf4.apply(_0x6d03a, arguments);
|
||||
_0x24dbf4 = null;
|
||||
return _0x217a12;
|
||||
}
|
||||
} : function () {};
|
||||
_0x61e097 = false;
|
||||
return _0x2c317a;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a3_0x266357(this, function () {
|
||||
var _0x673e54 = new RegExp("function *\\( *\\)");
|
||||
var _0x34001d = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
var _0x38dc35 = a3_0x454870("init");
|
||||
if (!_0x673e54.test(_0x38dc35 + "chain") || !_0x34001d.test(_0x38dc35 + "input")) {
|
||||
_0x38dc35('0');
|
||||
} else {
|
||||
a3_0x454870();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
module.exports = {
|
||||
query: async function (db, sql) {
|
||||
return new Promise((resolve, reject) => {
|
||||
db.query(sql, async (error, results) => {
|
||||
if (error) {
|
||||
throw error;
|
||||
'query': async function (_0x1b7403, _0x87526f) {
|
||||
return new Promise(function (_0x3474cc, _0x13489a) {
|
||||
_0x1b7403.query(_0x87526f, async function (_0x4e0b4c, _0xf1b0fa) {
|
||||
if (_0x4e0b4c) {
|
||||
throw _0x4e0b4c;
|
||||
}
|
||||
|
||||
if (results.length > 0) {
|
||||
resolve(results[0]);
|
||||
if (_0xf1b0fa.length > 0x0) {
|
||||
_0x3474cc(_0xf1b0fa[0x0]);
|
||||
} else {
|
||||
resolve(false);
|
||||
_0x3474cc(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
queryMulti: async function (db, sql) {
|
||||
return new Promise((resolve, reject) => {
|
||||
db.query(sql, async (error, results) => {
|
||||
if (error) {
|
||||
throw error;
|
||||
'queryMulti': async function (_0x5c7f4e, _0x2481bd) {
|
||||
return new Promise(function (_0x1e5738, _0x4b5ba3) {
|
||||
_0x5c7f4e.query(_0x2481bd, async function (_0x60e5cb, _0x10dfa3) {
|
||||
if (_0x60e5cb) {
|
||||
throw _0x60e5cb;
|
||||
}
|
||||
|
||||
if (results.length > 0) {
|
||||
resolve(results);
|
||||
if (_0x10dfa3.length > 0x0) {
|
||||
_0x1e5738(_0x10dfa3);
|
||||
} else {
|
||||
resolve(false);
|
||||
_0x1e5738(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
function a3_0x454870(_0x551678) {
|
||||
function _0x48a9f9(_0x58cd10) {
|
||||
if (typeof _0x58cd10 === "string") {
|
||||
return function (_0x42d4b0) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x58cd10 / _0x58cd10).length !== 0x1 || _0x58cd10 % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x48a9f9(++_0x58cd10);
|
||||
}
|
||||
try {
|
||||
if (_0x551678) {
|
||||
return _0x48a9f9;
|
||||
} else {
|
||||
_0x48a9f9(0x0);
|
||||
}
|
||||
} catch (_0x15fb88) {}
|
||||
}
|
|
@ -1,5 +1,54 @@
|
|||
const { query, queryMulti } = require("./helper");
|
||||
const { ticket_settings } = require("../config");
|
||||
const a4_0x1098bc = function () {
|
||||
let _0x4cdd23 = true;
|
||||
return function (_0x5a2b99, _0x1fff96) {
|
||||
const _0x20e364 = _0x4cdd23 ? function () {
|
||||
if (_0x1fff96) {
|
||||
const _0x2898c0 = _0x1fff96.apply(_0x5a2b99, arguments);
|
||||
_0x1fff96 = null;
|
||||
return _0x2898c0;
|
||||
}
|
||||
} : function () {};
|
||||
_0x4cdd23 = false;
|
||||
return _0x20e364;
|
||||
};
|
||||
}();
|
||||
const a4_0x26ceb5 = a4_0x1098bc(this, function () {
|
||||
return a4_0x26ceb5.toString().search("(((.+)+)+)+$").toString().constructor(a4_0x26ceb5).search("(((.+)+)+)+$");
|
||||
});
|
||||
a4_0x26ceb5();
|
||||
const a4_0x443623 = function () {
|
||||
let _0x5056d8 = true;
|
||||
return function (_0x333acb, _0x2a720f) {
|
||||
const _0x38feb6 = _0x5056d8 ? function () {
|
||||
if (_0x2a720f) {
|
||||
const _0x1125b4 = _0x2a720f.apply(_0x333acb, arguments);
|
||||
_0x2a720f = null;
|
||||
return _0x1125b4;
|
||||
}
|
||||
} : function () {};
|
||||
_0x5056d8 = false;
|
||||
return _0x38feb6;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a4_0x443623(this, function () {
|
||||
const _0x144279 = new RegExp("function *\\( *\\)");
|
||||
const _0x286410 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x1c198d = a4_0x671e8d("init");
|
||||
if (!_0x144279.test(_0x1c198d + 'chain') || !_0x286410.test(_0x1c198d + "input")) {
|
||||
_0x1c198d('0');
|
||||
} else {
|
||||
a4_0x671e8d();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const {
|
||||
query,
|
||||
queryMulti
|
||||
} = require("./helper");
|
||||
const {
|
||||
ticket_settings
|
||||
} = require("../config");
|
||||
const discordTranscripts = require("discord-html-transcripts");
|
||||
const {
|
||||
EmbedBuilder,
|
||||
|
@ -8,324 +57,254 @@ const {
|
|||
ModalBuilder,
|
||||
TextInputBuilder
|
||||
} = require('discord.js');
|
||||
|
||||
module.exports = async (client, db) => {
|
||||
client.on("interactionCreate", async interaction => {
|
||||
if (!interaction.customId) {
|
||||
module.exports = async (_0x2c1e71, _0x1ccdb4) => {
|
||||
_0x2c1e71.on("interactionCreate", async _0x141f56 => {
|
||||
if (!_0x141f56.customId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (interaction.customId === "newTicket") {
|
||||
const [, ticketOptionId] = interaction.values[0].split("newTicket_");
|
||||
const ticketOption = await query(
|
||||
db,
|
||||
`SELECT * FROM options WHERE id='${ticketOptionId}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
const questions = await queryMulti(
|
||||
db,
|
||||
`SELECT * FROM questions WHERE optionID='${ticketOptionId}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
|
||||
if (questions) {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Ticket Form")
|
||||
.setCustomId(`ticket_${ticketOptionId}`);
|
||||
|
||||
questions.forEach((question, index) => {
|
||||
const textInput = new TextInputBuilder()
|
||||
.setLabel(question.question)
|
||||
.setStyle(question.answer_type)
|
||||
.setRequired(question.required)
|
||||
.setCustomId(`input_${question.id}`)
|
||||
.setPlaceholder(question.place_holder);
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(textInput);
|
||||
modal.addComponents(actionRow);
|
||||
if (_0x141f56.customId == "newTicket") {
|
||||
let _0x354ecf = _0x141f56.values[0x0].split("newTicket_")[0x1];
|
||||
let _0x10b5fd = await query(_0x1ccdb4, "SELECT * FROM options WHERE id='" + _0x354ecf + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x53924f = await queryMulti(_0x1ccdb4, "SELECT * FROM questions WHERE optionID='" + _0x354ecf + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
if (_0x53924f) {
|
||||
let _0x14a5b = new ModalBuilder().setTitle("Ticket Form").setCustomId("ticket_" + _0x354ecf);
|
||||
_0x53924f.forEach((_0x43d021, _0x316ee2) => {
|
||||
let _0x1da782 = new TextInputBuilder().setLabel(_0x43d021.question).setStyle(_0x43d021.answer_type).setRequired(_0x43d021.required).setCustomId('input_' + _0x43d021.id).setPlaceholder(_0x43d021.place_holder);
|
||||
let _0x5123ac = new ActionRowBuilder().addComponents(_0x1da782);
|
||||
_0x14a5b.addComponents(_0x5123ac);
|
||||
});
|
||||
|
||||
return interaction.showModal(modal);
|
||||
return _0x141f56.showModal(_0x14a5b);
|
||||
} else {
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setDescription(ticket_settings.ticket_message.replace("{user}", interaction.user))
|
||||
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||
.setAuthor({
|
||||
name: interaction.user.tag,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
});
|
||||
|
||||
const existingTicket = await query(
|
||||
db,
|
||||
`SELECT * FROM tickets WHERE status='open' AND userID='${interaction.user.id}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
const existingChannel = client.channels.cache.get(existingTicket?.channelID);
|
||||
|
||||
if (existingTicket && existingChannel) {
|
||||
return interaction.editReply({
|
||||
content: `You already have a ticket! Please check the ${existingChannel}`,
|
||||
ephemeral: true
|
||||
const _0x3bd581 = {
|
||||
ephemeral: true
|
||||
};
|
||||
await _0x141f56.deferReply(_0x3bd581);
|
||||
let _0x15dd4e = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setDescription(ticket_settings.ticket_message.replace("{user}", _0x141f56.user)).setThumbnail(ticket_settings.ticket_thumbnail).setAuthor({
|
||||
'name': _0x141f56.user.tag,
|
||||
'iconURL': _0x141f56.user.avatarURL()
|
||||
});
|
||||
let _0x2e971f = await query(_0x1ccdb4, "SELECT * FROM tickets WHERE status='open' AND userID='" + _0x141f56.user.id + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x1a5e22 = _0x2c1e71.channels.cache.get(_0x2e971f?.["channelID"]);
|
||||
if (_0x2e971f && _0x1a5e22) {
|
||||
return _0x141f56.editReply({
|
||||
'content': "You already have a ticket! Please check the " + _0x1a5e22,
|
||||
'ephemeral': true
|
||||
});
|
||||
}
|
||||
|
||||
const settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||
db.query(`UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='${interaction.guildId}'`);
|
||||
|
||||
const permissions = [
|
||||
{
|
||||
id: interaction.guildId,
|
||||
deny: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: interaction.member.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: client.user.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: settings?.support_roleID,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
let _0x21f8a3 = await query(_0x1ccdb4, "SELECT * FROM settings WHERE guildID='" + _0x141f56.guildId + "'");
|
||||
_0x1ccdb4.query("UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='" + _0x141f56.guildId + "'");
|
||||
const _0x2997c8 = {
|
||||
id: _0x2c1e71.user.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
};
|
||||
_0x1a5e22 = await _0x141f56.guild.channels.create({
|
||||
'parent': _0x10b5fd?.["categoryID"],
|
||||
'name': 'ticket-' + pad(_0x21f8a3.ticket_counter + 0x1, 0x4),
|
||||
'topic': "#Ticket | From " + _0x141f56.user.username,
|
||||
'permissionOverwrites': [{
|
||||
'id': _0x141f56.guildId,
|
||||
'deny': ["ViewChannel", "SendMessages"]
|
||||
}, {
|
||||
'id': _0x141f56.member.id,
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}, _0x2997c8, {
|
||||
'id': _0x21f8a3?.["support_roleID"],
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}]
|
||||
});
|
||||
let _0x563af4 = new ButtonBuilder().setEmoji(ticket_settings.buttoncloseemoji).setLabel(ticket_settings.buttoncloselabel).setStyle(ticket_settings.buttonclosestyle).setCustomId("close_ticket");
|
||||
let _0x1dbe1b = new ActionRowBuilder().addComponents(_0x563af4);
|
||||
const _0x296f4a = {
|
||||
content: '<@&' + _0x21f8a3?.["support_roleID"] + '>',
|
||||
"embeds": [_0x15dd4e],
|
||||
"components": [_0x1dbe1b]
|
||||
};
|
||||
await _0x1a5e22.send(_0x296f4a);
|
||||
const _0x3b5a1c = {
|
||||
content: "You successfully created a ticket! Please check the " + _0x1a5e22,
|
||||
"ephemeral": true
|
||||
};
|
||||
await _0x141f56.editReply(_0x3b5a1c);
|
||||
_0x1ccdb4.query("INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)", [pad(_0x21f8a3.ticket_counter + 0x1, 0x4), "open", _0x141f56.user.id, _0x141f56.guildId, _0x1a5e22.id]);
|
||||
}
|
||||
} else {
|
||||
if (_0x141f56.customId.startsWith("ticket_")) {
|
||||
if (!_0x141f56.isModalSubmit()) {
|
||||
return;
|
||||
}
|
||||
const _0x1b88f8 = {
|
||||
"ephemeral": true
|
||||
};
|
||||
await _0x141f56.deferReply(_0x1b88f8);
|
||||
let _0x46f77c = _0x141f56.customId.split("ticket_")[0x1];
|
||||
let _0x30497f = await query(_0x1ccdb4, "SELECT * FROM options WHERE id='" + _0x46f77c + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x50c5ec = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setDescription(ticket_settings.ticket_message.replace("{user}", _0x141f56.user)).setAuthor({
|
||||
'name': _0x141f56.user.tag,
|
||||
'iconURL': _0x141f56.user.avatarURL()
|
||||
});
|
||||
let _0x5de644 = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setAuthor({
|
||||
'name': _0x141f56.user.tag,
|
||||
'iconURL': _0x141f56.user.avatarURL()
|
||||
});
|
||||
_0x141f56.fields.fields.forEach(async _0x3937cc => {
|
||||
let _0x4b647e = await query(_0x1ccdb4, "SELECT * FROM questions WHERE id='" + _0x3937cc.customId.split("input_")[0x1] + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
const _0xf70e70 = {
|
||||
"name": _0x4b647e.question,
|
||||
value: '```' + _0x3937cc.value + "```",
|
||||
"inline": false
|
||||
};
|
||||
_0x5de644.addFields(_0xf70e70);
|
||||
});
|
||||
let _0x3ce2f7 = await query(_0x1ccdb4, "SELECT * FROM tickets WHERE status='open' AND userID='" + _0x141f56.user.id + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x5a9bd5 = _0x2c1e71.channels.cache.get(_0x3ce2f7?.["channelID"]);
|
||||
if (_0x3ce2f7 && _0x5a9bd5) {
|
||||
return _0x141f56.editReply({
|
||||
'content': "You already have a ticket! Please check the " + _0x5a9bd5,
|
||||
'ephemeral': true
|
||||
});
|
||||
}
|
||||
let _0x27ebcb = await query(_0x1ccdb4, "SELECT * FROM settings WHERE guildID='" + _0x141f56.guildId + "'");
|
||||
_0x1ccdb4.query("UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='" + _0x141f56.guildId + "'");
|
||||
const _0x518b83 = {
|
||||
id: _0x2c1e71.user.id,
|
||||
"allow": ["ViewChannel", "SendMessages"]
|
||||
};
|
||||
_0x5a9bd5 = await _0x141f56.guild.channels.create({
|
||||
'parent': _0x30497f?.["categoryID"],
|
||||
'name': "ticket-" + pad(_0x27ebcb.ticket_counter + 0x1, 0x4),
|
||||
'topic': "#Ticket | From " + _0x141f56.user.username,
|
||||
'permissionOverwrites': [{
|
||||
'id': _0x141f56.guildId,
|
||||
'deny': ["ViewChannel", "SendMessages"]
|
||||
}, {
|
||||
'id': _0x141f56.member.id,
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}, _0x518b83, {
|
||||
'id': _0x27ebcb?.["support_roleID"],
|
||||
'allow': ["ViewChannel", "SendMessages"]
|
||||
}]
|
||||
});
|
||||
let _0x57cf4a = new ButtonBuilder().setEmoji(ticket_settings.buttoncloseemoji).setLabel(ticket_settings.buttoncloselabel).setStyle(ticket_settings.buttonclosestyle).setCustomId("close_ticket");
|
||||
let _0x4c6d76 = new ActionRowBuilder().addComponents(_0x57cf4a);
|
||||
const _0x1fe060 = {
|
||||
content: "<@&" + _0x27ebcb?.["support_roleID"] + '>',
|
||||
"embeds": [_0x50c5ec, _0x5de644],
|
||||
"components": [_0x4c6d76]
|
||||
};
|
||||
await _0x5a9bd5.send(_0x1fe060);
|
||||
const _0x3a2617 = {
|
||||
"content": "You successfully created a ticket! Please check the " + _0x5a9bd5,
|
||||
"ephemeral": true
|
||||
};
|
||||
await _0x141f56.editReply(_0x3a2617);
|
||||
_0x1ccdb4.query("INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)", [pad(_0x27ebcb.ticket_counter + 0x1, 0x4), "open", _0x141f56.user.id, _0x141f56.guildId, _0x5a9bd5.id]);
|
||||
} else {
|
||||
if (_0x141f56.customId == "close_ticket") {
|
||||
let _0x89d221 = new ModalBuilder().setTitle("Close Ticket").setCustomId("close_ticket_form");
|
||||
let _0x26437c = new TextInputBuilder().setRequired(false).setCustomId('input').setStyle("Paragraph").setLabel("Close message");
|
||||
let _0x87597d = new ActionRowBuilder().addComponents(_0x26437c);
|
||||
_0x89d221.addComponents(_0x87597d);
|
||||
return _0x141f56.showModal(_0x89d221);
|
||||
} else {
|
||||
if (_0x141f56.customId == "close_ticket_form") {
|
||||
if (!_0x141f56.isModalSubmit()) {
|
||||
return;
|
||||
}
|
||||
const _0x1326cd = {
|
||||
ephemeral: true
|
||||
};
|
||||
await _0x141f56.deferReply(_0x1326cd);
|
||||
let _0x3d23ca = _0x141f56.fields.getTextInputValue("input");
|
||||
const _0x42aa3f = {
|
||||
"saveImages": true,
|
||||
"footerText": "Saved {number} message{s}",
|
||||
"poweredBy": false
|
||||
};
|
||||
let _0x1d26e5 = await discordTranscripts.createTranscript(_0x141f56.channel, _0x42aa3f);
|
||||
const _0x17e607 = {
|
||||
"content": "You successfully closed the ticket!",
|
||||
"ephemeral": true
|
||||
};
|
||||
await _0x141f56.editReply(_0x17e607);
|
||||
let _0xbb9286 = await query(_0x1ccdb4, "SELECT * FROM tickets WHERE status='open' AND channelID='" + _0x141f56.channel.id + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x53073f = await query(_0x1ccdb4, "SELECT * FROM settings WHERE guildID='" + _0x141f56.guildId + "'");
|
||||
let _0x2d2787 = _0x53073f?.["log_channelID"];
|
||||
let _0xb49309 = _0x2c1e71.channels.cache.get(_0x2d2787);
|
||||
let _0x4f074e = _0x2c1e71.users.cache.get(_0xbb9286.userID);
|
||||
const _0x4be551 = {
|
||||
'text': _0x141f56.guild.name
|
||||
};
|
||||
const _0x1094be = {
|
||||
'name': "Ticket has been closed!"
|
||||
};
|
||||
const _0x2feef0 = {
|
||||
name: 'Ticket',
|
||||
"value": "```" + _0x141f56.channel.name + "```",
|
||||
inline: true
|
||||
};
|
||||
const _0x48208d = {
|
||||
"name": "Ticket Author",
|
||||
"value": "```" + _0x4f074e.tag + "```",
|
||||
"inline": true
|
||||
};
|
||||
const _0x2a2fc5 = {
|
||||
name: "Server",
|
||||
value: "```" + _0x141f56.guild.name + "```",
|
||||
"inline": true
|
||||
};
|
||||
const _0xe99989 = {
|
||||
"name": "Reason",
|
||||
"value": "```" + _0x3d23ca + '```',
|
||||
inline: false
|
||||
};
|
||||
let _0x3bfb03 = new EmbedBuilder().setTimestamp().setColor(ticket_settings.embed_color).setFooter(_0x4be551).setAuthor(_0x1094be).addFields(_0x2feef0, _0x48208d, _0x2a2fc5, _0xe99989);
|
||||
const _0x4417a0 = {
|
||||
"embeds": [_0x3bfb03],
|
||||
files: [_0x1d26e5]
|
||||
};
|
||||
await _0x4f074e?.["send"](_0x4417a0)["catch"](_0x3f4c75 => {});
|
||||
const _0x532f42 = {
|
||||
"embeds": [_0x3bfb03],
|
||||
"files": [_0x1d26e5]
|
||||
};
|
||||
await _0xb49309?.["send"](_0x532f42)["catch"](_0x35f8d8 => {});
|
||||
await query(_0x1ccdb4, "UPDATE tickets SET status='closed' WHERE channelID='" + _0x2d2787 + "' AND guildID='" + _0x141f56.guildId + "'");
|
||||
return _0x141f56.channel["delete"]();
|
||||
}
|
||||
];
|
||||
|
||||
const channel = await interaction.guild.channels.create({
|
||||
parent: ticketOption?.categoryID,
|
||||
name: `ticket-${pad(settings.ticket_counter + 1, 4)}`,
|
||||
topic: `#Ticket | From ${interaction.user.username}`,
|
||||
permissionOverwrites: permissions
|
||||
});
|
||||
|
||||
const closeButton = new ButtonBuilder()
|
||||
.setEmoji(ticket_settings.buttoncloseemoji)
|
||||
.setLabel(ticket_settings.buttoncloselabel)
|
||||
.setStyle(ticket_settings.buttonclosestyle)
|
||||
.setCustomId("close_ticket");
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(closeButton);
|
||||
|
||||
await channel.send({
|
||||
content: `<@&${settings?.support_roleID}>`,
|
||||
embeds: [embed],
|
||||
components: [actionRow]
|
||||
});
|
||||
|
||||
await interaction.editReply({
|
||||
content: `You successfully created a ticket! Please check the ${channel}`,
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
db.query(
|
||||
"INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)",
|
||||
[pad(settings.ticket_counter + 1, 4), "open", interaction.user.id, interaction.guildId, channel.id]
|
||||
);
|
||||
}
|
||||
} else if (interaction.customId.startsWith("ticket_")) {
|
||||
if (!interaction.isModalSubmit()) {
|
||||
return;
|
||||
}
|
||||
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
|
||||
const ticketOptionId = interaction.customId.split("ticket_")[1];
|
||||
const ticketOption = await query(
|
||||
db,
|
||||
`SELECT * FROM options WHERE id='${ticketOptionId}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
|
||||
const userEmbed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setDescription(ticket_settings.ticket_message.replace("{user}", interaction.user))
|
||||
.setAuthor({
|
||||
name: interaction.user.tag,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
});
|
||||
|
||||
const answerEmbed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setAuthor({
|
||||
name: interaction.user.tag,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
});
|
||||
|
||||
interaction.fields.fields.forEach(async field => {
|
||||
const question = await query(
|
||||
db,
|
||||
`SELECT * FROM questions WHERE id='${field.customId.split("input_")[1]}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
|
||||
answerEmbed.addFields({
|
||||
name: question.question,
|
||||
value: `\`\`\`${field.value}\`\`\``,
|
||||
inline: false
|
||||
});
|
||||
});
|
||||
|
||||
const existingTicket = await query(
|
||||
db,
|
||||
`SELECT * FROM tickets WHERE status='open' AND userID='${interaction.user.id}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
const existingChannel = client.channels.cache.get(existingTicket?.channelID);
|
||||
|
||||
if (existingTicket && existingChannel) {
|
||||
return interaction.editReply({
|
||||
content: `You already have a ticket! Please check the ${existingChannel}`,
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
|
||||
const settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||
db.query(`UPDATE settings SET ticket_counter=ticket_counter+1 WHERE guildID='${interaction.guildId}'`);
|
||||
|
||||
const permissions = [
|
||||
{
|
||||
id: interaction.guildId,
|
||||
deny: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: interaction.member.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: client.user.id,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
},
|
||||
{
|
||||
id: settings?.support_roleID,
|
||||
allow: ["ViewChannel", "SendMessages"]
|
||||
}
|
||||
];
|
||||
|
||||
const channel = await interaction.guild.channels.create({
|
||||
parent: ticketOption?.categoryID,
|
||||
name: `ticket-${pad(settings.ticket_counter + 1, 4)}`,
|
||||
topic: `#Ticket | From ${interaction.user.username}`,
|
||||
permissionOverwrites: permissions
|
||||
});
|
||||
|
||||
const closeButton = new ButtonBuilder()
|
||||
.setEmoji(ticket_settings.buttoncloseemoji)
|
||||
.setLabel(ticket_settings.buttoncloselabel)
|
||||
.setStyle(ticket_settings.buttonclosestyle)
|
||||
.setCustomId("close_ticket");
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(closeButton);
|
||||
|
||||
await channel.send({
|
||||
content: `<@&${settings?.support_roleID}>`,
|
||||
embeds: [userEmbed, answerEmbed],
|
||||
components: [actionRow]
|
||||
});
|
||||
|
||||
await interaction.editReply({
|
||||
content: `You successfully created a ticket! Please check the ${channel}`,
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
db.query(
|
||||
"INSERT INTO tickets (id, status, userID, guildID, channelID) VALUES (?, ?, ?, ?, ?)",
|
||||
[pad(settings.ticket_counter + 1, 4), "open", interaction.user.id, interaction.guildId, channel.id]
|
||||
);
|
||||
} else if (interaction.customId === "close_ticket") {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Close Ticket")
|
||||
.setCustomId("close_ticket_form");
|
||||
|
||||
const textInput = new TextInputBuilder()
|
||||
.setRequired(false)
|
||||
.setCustomId('input')
|
||||
.setStyle("Paragraph")
|
||||
.setLabel("Close message");
|
||||
|
||||
const actionRow = new ActionRowBuilder().addComponents(textInput);
|
||||
modal.addComponents(actionRow);
|
||||
|
||||
return interaction.showModal(modal);
|
||||
} else if (interaction.customId === "close_ticket_form") {
|
||||
if (!interaction.isModalSubmit()) {
|
||||
return;
|
||||
}
|
||||
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
|
||||
const closeMessage = interaction.fields.getTextInputValue("input");
|
||||
const transcript = await discordTranscripts.createTranscript(interaction.channel, {
|
||||
saveImages: true,
|
||||
footerText: "Saved {number} message{s}",
|
||||
poweredBy: false
|
||||
});
|
||||
|
||||
await interaction.editReply({
|
||||
content: "You successfully closed the ticket!",
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
const ticket = await query(
|
||||
db,
|
||||
`SELECT * FROM tickets WHERE status='open' AND channelID='${interaction.channel.id}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
const settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||
const logChannel = settings?.log_channelID;
|
||||
const logChannelObj = client.channels.cache.get(logChannel);
|
||||
const user = client.users.cache.get(ticket.userID);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setFooter({ text: interaction.guild.name })
|
||||
.setAuthor({ name: "Ticket has been closed!" })
|
||||
.addFields(
|
||||
{
|
||||
name: 'Ticket',
|
||||
value: `\`\`\`${interaction.channel.name}\`\`\``,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: "Ticket Author",
|
||||
value: `\`\`\`${user.tag}\`\`\``,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: "Server",
|
||||
value: `\`\`\`${interaction.guild.name}\`\`\``,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: "Reason",
|
||||
value: `\`\`\`${closeMessage}\`\`\``,
|
||||
inline: false
|
||||
}
|
||||
);
|
||||
|
||||
await user?.send({
|
||||
embeds: [embed],
|
||||
files: [transcript]
|
||||
}).catch(() => {});
|
||||
|
||||
await logChannelObj?.send({
|
||||
embeds: [embed],
|
||||
files: [transcript]
|
||||
}).catch(() => {});
|
||||
|
||||
await query(
|
||||
db,
|
||||
`UPDATE tickets SET status='closed' WHERE channelID='${logChannel}' AND guildID='${interaction.guildId}'`
|
||||
);
|
||||
|
||||
return interaction.channel.delete();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function pad(num, size) {
|
||||
let numStr = num.toString();
|
||||
while (numStr.length < size) {
|
||||
numStr = '0' + numStr;
|
||||
function pad(_0x48a0b8, _0x5ca8b2) {
|
||||
_0x48a0b8 = _0x48a0b8.toString();
|
||||
while (_0x48a0b8.length < _0x5ca8b2) {
|
||||
_0x48a0b8 = '0' + _0x48a0b8;
|
||||
}
|
||||
return numStr;
|
||||
return _0x48a0b8;
|
||||
}
|
||||
function a4_0x671e8d(_0x218198) {
|
||||
function _0x4cd39c(_0x114fc8) {
|
||||
if (typeof _0x114fc8 === "string") {
|
||||
return function (_0x231b18) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x114fc8 / _0x114fc8).length !== 0x1 || _0x114fc8 % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x4cd39c(++_0x114fc8);
|
||||
}
|
||||
try {
|
||||
if (_0x218198) {
|
||||
return _0x4cd39c;
|
||||
} else {
|
||||
_0x4cd39c(0x0);
|
||||
}
|
||||
} catch (_0x176c7b) {}
|
||||
}
|
137
helpers/ready.js
137
helpers/ready.js
|
@ -1,62 +1,91 @@
|
|||
module.exports = async db => {
|
||||
// Create tickets table if it doesn't exist
|
||||
db.query(`
|
||||
CREATE TABLE IF NOT EXISTS tickets (
|
||||
id TEXT,
|
||||
status TEXT,
|
||||
userID TEXT,
|
||||
guildID TEXT,
|
||||
channelID TEXT
|
||||
)
|
||||
`, function (error, results) {
|
||||
if (error) {
|
||||
throw error;
|
||||
var a5_0x3bf501 = function () {
|
||||
var _0x4e9cf3 = true;
|
||||
return function (_0x34cb3b, _0x6c2501) {
|
||||
var _0x58713c = _0x4e9cf3 ? function () {
|
||||
if (_0x6c2501) {
|
||||
var _0x182788 = _0x6c2501.apply(_0x34cb3b, arguments);
|
||||
_0x6c2501 = null;
|
||||
return _0x182788;
|
||||
}
|
||||
} : function () {};
|
||||
_0x4e9cf3 = false;
|
||||
return _0x58713c;
|
||||
};
|
||||
}();
|
||||
var a5_0x1e7cc0 = a5_0x3bf501(this, function () {
|
||||
return a5_0x1e7cc0.toString().search("(((.+)+)+)+$").toString().constructor(a5_0x1e7cc0).search("(((.+)+)+)+$");
|
||||
});
|
||||
a5_0x1e7cc0();
|
||||
var a5_0x273a9c = function () {
|
||||
var _0x463463 = true;
|
||||
return function (_0x51ce68, _0x491268) {
|
||||
var _0x5aab3f = _0x463463 ? function () {
|
||||
if (_0x491268) {
|
||||
var _0xa18db6 = _0x491268.apply(_0x51ce68, arguments);
|
||||
_0x491268 = null;
|
||||
return _0xa18db6;
|
||||
}
|
||||
} : function () {};
|
||||
_0x463463 = false;
|
||||
return _0x5aab3f;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a5_0x273a9c(this, function () {
|
||||
var _0x231bb4 = new RegExp("function *\\( *\\)");
|
||||
var _0xda231f = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
var _0x3374db = a5_0x7e176e("init");
|
||||
if (!_0x231bb4.test(_0x3374db + "chain") || !_0xda231f.test(_0x3374db + "input")) {
|
||||
_0x3374db('0');
|
||||
} else {
|
||||
a5_0x7e176e();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
module.exports = async _0x3e4acc => {
|
||||
_0x3e4acc.query("CREATE TABLE if not exists tickets(\n id TEXT,\n status TEXT,\n userID TEXT,\n guildID TEXT,\n channelID TEXT\n )", function (_0x444f6a, _0x5de542) {
|
||||
if (_0x444f6a) {
|
||||
throw _0x444f6a;
|
||||
}
|
||||
});
|
||||
|
||||
// Create questions table if it doesn't exist
|
||||
db.query(`
|
||||
CREATE TABLE IF NOT EXISTS questions (
|
||||
id TEXT,
|
||||
guildID TEXT,
|
||||
optionID TEXT,
|
||||
question TEXT,
|
||||
answer_type TEXT,
|
||||
place_holder TEXT,
|
||||
answer_required BOOLEAN
|
||||
)
|
||||
`, function (error, results) {
|
||||
if (error) {
|
||||
throw error;
|
||||
_0x3e4acc.query("CREATE TABLE if not exists questions(\n id TEXT,\n guildID TEXT,\n optionID TEXT,\n question TEXT,\n answer_type TEXT,\n place_holder TEXT,\n answer_required BOOLEAN\n )", function (_0x21b952, _0x1f4bdf) {
|
||||
if (_0x21b952) {
|
||||
throw _0x21b952;
|
||||
}
|
||||
});
|
||||
|
||||
// Create settings table if it doesn't exist
|
||||
db.query(`
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
ticket_counter INT,
|
||||
support_roleID TEXT,
|
||||
log_channelID TEXT,
|
||||
guildID VARCHAR(255) PRIMARY KEY
|
||||
)
|
||||
`, function (error, results) {
|
||||
if (error) {
|
||||
throw error;
|
||||
_0x3e4acc.query("CREATE TABLE if not exists settings(\n ticket_counter INT,\n support_roleID TEXT,\n log_channelID TEXT,\n guildID VARCHAR(255) PRIMARY KEY\n )", function (_0x58b252, _0x5e6dff) {
|
||||
if (_0x58b252) {
|
||||
throw _0x58b252;
|
||||
}
|
||||
});
|
||||
|
||||
// Create options table if it doesn't exist
|
||||
db.query(`
|
||||
CREATE TABLE IF NOT EXISTS options (
|
||||
id TEXT,
|
||||
guildID TEXT,
|
||||
categoryID TEXT,
|
||||
name TEXT,
|
||||
description TEXT
|
||||
)
|
||||
`, function (error, results) {
|
||||
if (error) {
|
||||
throw error;
|
||||
_0x3e4acc.query("CREATE TABLE if not exists options(\n id TEXT,\n guildID TEXT,\n categoryID TEXT,\n name TEXT,\n description TEXT\n )", function (_0x43657e, _0x3b71e3) {
|
||||
if (_0x43657e) {
|
||||
throw _0x43657e;
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
function a5_0x7e176e(_0x2f23b3) {
|
||||
function _0x4482b3(_0x1d25ca) {
|
||||
if (typeof _0x1d25ca === "string") {
|
||||
return function (_0x5e98e9) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x1d25ca / _0x1d25ca).length !== 0x1 || _0x1d25ca % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call('action');
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x4482b3(++_0x1d25ca);
|
||||
}
|
||||
try {
|
||||
if (_0x2f23b3) {
|
||||
return _0x4482b3;
|
||||
} else {
|
||||
_0x4482b3(0x0);
|
||||
}
|
||||
} catch (_0x1519c0) {}
|
||||
}
|
173
index.js
173
index.js
|
@ -1,10 +1,13 @@
|
|||
const fs = require('fs');
|
||||
const sqlite3 = require('sqlite3').verbose();
|
||||
const request = require("request");
|
||||
const config = require("./config.js");
|
||||
const packageInfo = require("./package.json");
|
||||
const terminal = require("terminal-kit").terminal;
|
||||
const apiHelper = require("./helpers/api.js");
|
||||
const { queryMulti } = require("./helpers/helper.js");
|
||||
const { Client, GatewayIntentBits, Partials, Collection, ActivityType, Routes, REST, EmbedBuilder } = require('discord.js');
|
||||
const mysql = require('mysql');
|
||||
|
||||
const clientOptions = {
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildPresences],
|
||||
|
@ -15,72 +18,102 @@ const client = new Client(clientOptions);
|
|||
let databaseConnection;
|
||||
|
||||
// Open SQLite Database
|
||||
function connectToDatabase() {
|
||||
console.log("Attempting to connect to database at:", config.sqlite.dbPath);
|
||||
|
||||
// Check if database file exists
|
||||
if (!fs.existsSync(config.sqlite.dbPath)) {
|
||||
console.log("Database file does not exist. Creating a new one...");
|
||||
// Create empty file
|
||||
fs.writeFileSync(config.sqlite.dbPath, '');
|
||||
databaseConnection = new sqlite3.Database(config.sqlite.dbPath, sqlite3.OPEN_READWRITE, (err) => {
|
||||
if (err) {
|
||||
console.error("Error opening database", err.message);
|
||||
} else {
|
||||
console.log("Connected to the SQLite database.");
|
||||
// Ensure a table exists
|
||||
databaseConnection.run(`CREATE TABLE IF NOT EXISTS tableName (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
column1 TEXT,
|
||||
column2 TEXT
|
||||
)`, [], function(err) {
|
||||
if (err) {
|
||||
console.error("Error creating table", err.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
databaseConnection = new sqlite3.Database(config.sqlite.dbPath, sqlite3.OPEN_READWRITE, (err) => {
|
||||
if (err) {
|
||||
console.error("Error opening database:", err.message);
|
||||
if (err.code === 'SQLITE_CANTOPEN') {
|
||||
console.error("Failed to open database. Retrying in 2 seconds...");
|
||||
setTimeout(connectToDatabase, 2000);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
} else {
|
||||
console.log("Connected to the SQLite database.");
|
||||
createTableIfNotExists();
|
||||
}
|
||||
});
|
||||
|
||||
databaseConnection.on('error', (err) => {
|
||||
console.error('SQLite database error:', err);
|
||||
// Handle specific error codes if needed
|
||||
if (err.code === 'SQLITE_CANTOPEN') {
|
||||
console.error("Failed to open database. Retrying...");
|
||||
connectToDatabase();
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTableIfNotExists() {
|
||||
databaseConnection.run(`CREATE TABLE IF NOT EXISTS tableName (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
column1 TEXT,
|
||||
column2 TEXT
|
||||
)`, [], function(err) {
|
||||
if (err) {
|
||||
console.error("Error creating table:", err.message);
|
||||
} else {
|
||||
console.log("Table created or already exists.");
|
||||
require("./helpers/ready.js")(databaseConnection);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
connectToDatabase();
|
||||
|
||||
|
||||
|
||||
client.once('ready', async () => {
|
||||
console.log("Successfully logged in.");
|
||||
client.user.setStatus("Online");
|
||||
client.commands = new Collection();
|
||||
await registerCommands();
|
||||
updateActivity();
|
||||
console.log(`Logged in as ${client.user.tag}`);
|
||||
});
|
||||
|
||||
async function registerCommands() {
|
||||
function handleDisconnect() {
|
||||
const mysqlConfig = {
|
||||
"port": config.mysql.port,
|
||||
"charset": 'utf8mb4',
|
||||
host: config.mysql.host,
|
||||
"user": config.mysql.user,
|
||||
"password": config.mysql.password,
|
||||
"database": config.mysql.database
|
||||
};
|
||||
databaseConnection = mysql.createConnection(mysqlConfig);
|
||||
databaseConnection.connect(function (connectionError) {
|
||||
if (connectionError) {
|
||||
console.log("error when connecting to db:", connectionError);
|
||||
setTimeout(handleDisconnect, 0x7d0);
|
||||
} else {
|
||||
require("./helpers/ready.js")(databaseConnection);
|
||||
console.log("Connected to database!");
|
||||
}
|
||||
});
|
||||
databaseConnection.on("error", function (dbError) {
|
||||
console.log("db error", dbError);
|
||||
if (dbError.code === "PROTOCOL_CONNECTION_LOST") {
|
||||
handleDisconnect();
|
||||
} else {
|
||||
throw dbError;
|
||||
}
|
||||
});
|
||||
}
|
||||
handleDisconnect();
|
||||
|
||||
client.login(config.bot_token).then(() => {
|
||||
console.log("Successfully logged in.");
|
||||
checkLicense();
|
||||
}).catch((error) => {
|
||||
console.error("Failed to log in:", error);
|
||||
});
|
||||
|
||||
async function checkLicense() {
|
||||
terminal(`[^Y Checking^ ] [^G ${packageInfo.description} Checking license^ ].\n`);
|
||||
const headers = {
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
const requestData = {
|
||||
"license": config.licenseKey,
|
||||
domain: config.domainIP,
|
||||
packages: "NGoGAuth"
|
||||
};
|
||||
let requestOptions = {
|
||||
'method': "POST",
|
||||
'url': "https://ngog.net/api/v1/licenses/public/validate",
|
||||
'headers': headers,
|
||||
'body': JSON.stringify(requestData)
|
||||
};
|
||||
const licenseResponse = await new Promise(resolve => {
|
||||
request(requestOptions, function (requestError, response) {
|
||||
if (requestError) {
|
||||
throw new Error(requestError);
|
||||
}
|
||||
resolve(JSON.parse(response.body));
|
||||
});
|
||||
});
|
||||
if (licenseResponse.success) {
|
||||
client.login(config.bot_token);
|
||||
terminal(`[^G AUTHORIZED^ ][^B V${packageInfo.version}^ ] [^G ${packageInfo.description} ${licenseResponse.message}^ ]\n`);
|
||||
} else {
|
||||
terminal(`[^R UNAUTHORIZED^ ] ${licenseResponse.errors}.\n\n^+Activating Bot:^-\n^K Join our support server: https://discord.gg/TB8WN3fbFM \n^-`);
|
||||
}
|
||||
}
|
||||
|
||||
client.on('ready', () => {
|
||||
client.user.setStatus("Online");
|
||||
client.commands = new Collection();
|
||||
readCommands();
|
||||
updateActivity();
|
||||
terminal(`[^B INFO^ ] [^GLogged in as ${client.user.tag}^ ]\n`);
|
||||
});
|
||||
|
||||
async function readCommands() {
|
||||
let commandData = [];
|
||||
fs.readdirSync("./slash-commands").forEach(fileName => {
|
||||
let commandModule = require("./slash-commands/" + fileName);
|
||||
|
@ -96,19 +129,9 @@ async function registerCommands() {
|
|||
const requestBody = {
|
||||
"body": commandData
|
||||
};
|
||||
try {
|
||||
console.log('Started refreshing application (/) commands.');
|
||||
await new REST(restOptions).setToken(config.bot_token).put(Routes.applicationGuildCommands(client.user.id, config.guild_id), requestBody);
|
||||
console.log('Successfully reloaded application (/) commands.');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
await new REST(restOptions).setToken(config.bot_token).put(Routes.applicationGuildCommands(client.user.id, config.guild_id), requestBody);
|
||||
}
|
||||
|
||||
client.login(config.bot_token).catch((error) => {
|
||||
console.error("Failed to log in:", error);
|
||||
});
|
||||
|
||||
client.on("guildMemberUpdate", async (newMember, oldMember) => {
|
||||
if (newMember.partial) {
|
||||
try {
|
||||
|
@ -201,4 +224,4 @@ async function updateActivity() {
|
|||
activities: [activityDetails]
|
||||
};
|
||||
client.user.setPresence(activityOptions);
|
||||
}
|
||||
}
|
||||
|
|
6
renovate.json
Normal file
6
renovate.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
]
|
||||
}
|
|
@ -1,112 +1,132 @@
|
|||
const { ticket_settings } = require('../config');
|
||||
const { queryMulti } = require("../helpers/helper");
|
||||
const a8_0x474e1e = function () {
|
||||
let _0x4c0a0e = true;
|
||||
return function (_0x5d79a8, _0x1f27c1) {
|
||||
const _0x3f8b2f = _0x4c0a0e ? function () {
|
||||
if (_0x1f27c1) {
|
||||
const _0x2b4a77 = _0x1f27c1.apply(_0x5d79a8, arguments);
|
||||
_0x1f27c1 = null;
|
||||
return _0x2b4a77;
|
||||
}
|
||||
} : function () {};
|
||||
_0x4c0a0e = false;
|
||||
return _0x3f8b2f;
|
||||
};
|
||||
}();
|
||||
const a8_0x38d19b = a8_0x474e1e(this, function () {
|
||||
return a8_0x38d19b.toString().search("(((.+)+)+)+$").toString().constructor(a8_0x38d19b).search("(((.+)+)+)+$");
|
||||
});
|
||||
a8_0x38d19b();
|
||||
const a8_0x3286a0 = function () {
|
||||
let _0x235204 = true;
|
||||
return function (_0x1aacca, _0x8263bd) {
|
||||
const _0x1f4ebb = _0x235204 ? function () {
|
||||
if (_0x8263bd) {
|
||||
const _0x587b1f = _0x8263bd.apply(_0x1aacca, arguments);
|
||||
_0x8263bd = null;
|
||||
return _0x587b1f;
|
||||
}
|
||||
} : function () {};
|
||||
_0x235204 = false;
|
||||
return _0x1f4ebb;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a8_0x3286a0(this, function () {
|
||||
const _0x324afa = new RegExp("function *\\( *\\)");
|
||||
const _0x5e3476 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x1f4ede = a8_0x17bfc5("init");
|
||||
if (!_0x324afa.test(_0x1f4ede + "chain") || !_0x5e3476.test(_0x1f4ede + "input")) {
|
||||
_0x1f4ede('0');
|
||||
} else {
|
||||
a8_0x17bfc5();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const {
|
||||
ticket_settings
|
||||
} = require('../config');
|
||||
const {
|
||||
queryMulti
|
||||
} = require("../helpers/helper");
|
||||
const {
|
||||
SlashCommandBuilder,
|
||||
PermissionFlagsBits,
|
||||
EmbedBuilder
|
||||
} = require("discord.js");
|
||||
|
||||
const answerTypeChoices = [
|
||||
{
|
||||
name: "Short",
|
||||
value: "Short"
|
||||
},
|
||||
{
|
||||
name: "Paragraph",
|
||||
value: "Paragraph"
|
||||
}
|
||||
];
|
||||
|
||||
const answerRequiredChoices = [
|
||||
{
|
||||
name: "Yes",
|
||||
value: "Yes"
|
||||
},
|
||||
{
|
||||
name: "No",
|
||||
value: "No"
|
||||
}
|
||||
];
|
||||
|
||||
const a8_0x4ed738 = {
|
||||
"name": "Short",
|
||||
"value": "Short"
|
||||
};
|
||||
const a8_0xad3c43 = {
|
||||
"name": "Paragraph",
|
||||
"value": "Paragraph"
|
||||
};
|
||||
const a8_0x410cbe = {
|
||||
"name": "Yes",
|
||||
"value": "Yes"
|
||||
};
|
||||
const a8_0x3e2f57 = {
|
||||
name: 'No',
|
||||
"value": 'No'
|
||||
};
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("create-question")
|
||||
.setDescription("Create new question form ticket form")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("option")
|
||||
.setRequired(true)
|
||||
.setAutocomplete(true)
|
||||
.setDescription("Select the ticket option.")
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setMaxLength(45)
|
||||
.setRequired(true)
|
||||
.setName('question')
|
||||
.setDescription("Enter a question.")
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.setName("place-holder")
|
||||
.setDescription("Enter a place holder for answer area.")
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.setName("answer-type")
|
||||
.addChoices(...answerTypeChoices)
|
||||
.setDescription("Select type of the answer.")
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.setName("answer-required")
|
||||
.addChoices(...answerRequiredChoices)
|
||||
.setDescription("Select whether the answer is required or not.")
|
||||
)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
async run(client, interaction) {
|
||||
const { options } = interaction;
|
||||
const ephemeral = true;
|
||||
|
||||
await interaction.deferReply({ ephemeral });
|
||||
|
||||
const ticketOption = options.getString("option");
|
||||
const question = options.getString('question');
|
||||
const placeHolder = options.getString("place-holder");
|
||||
const answerType = options.getString("answer-type");
|
||||
const answerRequired = options.getString("answer-required") === "Yes";
|
||||
|
||||
const authorName = {
|
||||
name: interaction.guild.name
|
||||
'data': new SlashCommandBuilder().setName("create-question").setDescription("Create new question form ticket form").addStringOption(_0xd18c4d => _0xd18c4d.setName("option").setRequired(true).setAutocomplete(true).setDescription("Select the ticket option.")).addStringOption(_0xc292be => _0xc292be.setMaxLength(0x2d).setRequired(true).setName('question').setDescription("Enter a question.")).addStringOption(_0x25b049 => _0x25b049.setRequired(true).setName("place-holder").setDescription("Enter a place holder for answer area.")).addStringOption(_0x5d88ac => _0x5d88ac.setRequired(true).setName("answer-type").addChoices(a8_0x4ed738, a8_0xad3c43).setDescription("Select type of the answer.")).addStringOption(_0x3b630d => _0x3b630d.setRequired(true).setName("answer-required").addChoices(a8_0x410cbe, a8_0x3e2f57).setDescription("Select whether the answer is required or not.")).setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
async 'run'(_0x493d1f, _0x498f14) {
|
||||
let {
|
||||
options: _0x303722
|
||||
} = _0x498f14;
|
||||
const _0x966cc8 = {
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
let embed = new EmbedBuilder()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setAuthor(authorName)
|
||||
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||
.setDescription("You can't have more than 5 questions at the ticket form!");
|
||||
|
||||
const existingQuestions = await queryMulti(
|
||||
db,
|
||||
"SELECT * FROM questions WHERE guildID=? AND optionID=?",
|
||||
[interaction.guildId, ticketOption]
|
||||
);
|
||||
|
||||
if (existingQuestions.length > 5) {
|
||||
return interaction.editReply({ embeds: [embed], ephemeral });
|
||||
await _0x498f14.deferReply(_0x966cc8);
|
||||
let _0xef5166 = _0x303722.getString("option");
|
||||
let _0x231340 = _0x303722.getString('question');
|
||||
let _0x337111 = _0x303722.getString("place-holder");
|
||||
let _0x46dc09 = _0x303722.getString("answer-type");
|
||||
let _0x4272a7 = !!(_0x303722.getString("answer-required") == "Yes");
|
||||
const _0x2889c5 = {
|
||||
'name': _0x498f14.guild.name
|
||||
};
|
||||
let _0x4532b4 = new EmbedBuilder().setColor(ticket_settings.embed_color).setAuthor(_0x2889c5).setThumbnail(ticket_settings.ticket_thumbnail).setDescription("You can't have more than 5 questions at the ticket form!");
|
||||
let _0x2bf089 = await queryMulti(db, "SELECT * FROM questions WHERE guildID='" + _0x498f14.guildId + "' AND optionID='" + _0xef5166 + "'");
|
||||
const _0x2e47d2 = {
|
||||
"embeds": [_0x4532b4],
|
||||
"ephemeral": true
|
||||
};
|
||||
if (_0x2bf089.length > 0x5) {
|
||||
return _0x498f14.editReply(_0x2e47d2);
|
||||
}
|
||||
|
||||
await db.query(
|
||||
"INSERT INTO questions (id, guildID, optionID, question, place_holder, answer_type, answer_required) VALUES (?, ?, ?, ?, ?, ?, ?)",
|
||||
[interaction.id, interaction.guildId, ticketOption, question, placeHolder, answerType, answerRequired]
|
||||
);
|
||||
|
||||
embed.setDescription("You successfully added new question to ticket form!");
|
||||
|
||||
return interaction.editReply({ embeds: [embed], ephemeral });
|
||||
db.query("INSERT INTO questions (id, guildID, optionID, question, place_holder, answer_type, answer_required) VALUES (?, ?, ?, ?, ?, ?, ?)", [_0x498f14.id, _0x498f14.guildId, _0xef5166, _0x231340, _0x337111, _0x46dc09, _0x4272a7]);
|
||||
_0x4532b4.setDescription("You successfully added new question to ticket form!");
|
||||
const _0x36a251 = {
|
||||
"embeds": [_0x4532b4],
|
||||
"ephemeral": true
|
||||
};
|
||||
return _0x498f14.editReply(_0x36a251);
|
||||
}
|
||||
};
|
||||
};
|
||||
function a8_0x17bfc5(_0x305cb3) {
|
||||
function _0x220f08(_0x54a7b0) {
|
||||
if (typeof _0x54a7b0 === 'string') {
|
||||
return function (_0x31a1c0) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x54a7b0 / _0x54a7b0).length !== 0x1 || _0x54a7b0 % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call('action');
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x220f08(++_0x54a7b0);
|
||||
}
|
||||
try {
|
||||
if (_0x305cb3) {
|
||||
return _0x220f08;
|
||||
} else {
|
||||
_0x220f08(0x0);
|
||||
}
|
||||
} catch (_0x4b05c7) {}
|
||||
}
|
|
@ -1,38 +1,100 @@
|
|||
const a10_0x5e77e7 = function () {
|
||||
let _0x1c2782 = true;
|
||||
return function (_0x2945c9, _0x1c5f8e) {
|
||||
const _0x5c2fdd = _0x1c2782 ? function () {
|
||||
if (_0x1c5f8e) {
|
||||
const _0x2b429b = _0x1c5f8e.apply(_0x2945c9, arguments);
|
||||
_0x1c5f8e = null;
|
||||
return _0x2b429b;
|
||||
}
|
||||
} : function () {};
|
||||
_0x1c2782 = false;
|
||||
return _0x5c2fdd;
|
||||
};
|
||||
}();
|
||||
const a10_0x3a5b36 = a10_0x5e77e7(this, function () {
|
||||
return a10_0x3a5b36.toString().search("(((.+)+)+)+$").toString().constructor(a10_0x3a5b36).search("(((.+)+)+)+$");
|
||||
});
|
||||
a10_0x3a5b36();
|
||||
const a10_0x402f44 = function () {
|
||||
let _0x5c77df = true;
|
||||
return function (_0x5a20aa, _0x4bba50) {
|
||||
const _0x4bea88 = _0x5c77df ? function () {
|
||||
if (_0x4bba50) {
|
||||
const _0x1d1a21 = _0x4bba50.apply(_0x5a20aa, arguments);
|
||||
_0x4bba50 = null;
|
||||
return _0x1d1a21;
|
||||
}
|
||||
} : function () {};
|
||||
_0x5c77df = false;
|
||||
return _0x4bea88;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a10_0x402f44(this, function () {
|
||||
const _0x5ba8d7 = new RegExp("function *\\( *\\)");
|
||||
const _0x2fdd43 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x509473 = a10_0x4de25c('init');
|
||||
if (!_0x5ba8d7.test(_0x509473 + "chain") || !_0x2fdd43.test(_0x509473 + "input")) {
|
||||
_0x509473('0');
|
||||
} else {
|
||||
a10_0x4de25c();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const fs = require('fs');
|
||||
const path = require("node:path");
|
||||
const { SlashCommandBuilder, inlineCode, EmbedBuilder } = require("discord.js");
|
||||
|
||||
const {
|
||||
SlashCommandBuilder,
|
||||
inlineCode,
|
||||
EmbedBuilder
|
||||
} = require("discord.js");
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('help')
|
||||
.setDescription("Info regarding each slash command"),
|
||||
|
||||
async run(interaction) {
|
||||
let commandFiles = fs.readdirSync(__dirname).filter(file => file.endsWith(".js"));
|
||||
const footerText = { text: "Coded by @onurcansevinc" };
|
||||
|
||||
let helpEmbed = new EmbedBuilder()
|
||||
.setTitle("Help")
|
||||
.setColor("Random")
|
||||
.setFooter(footerText)
|
||||
.setDescription("This is a list of all of this bot's slash commands");
|
||||
|
||||
for (let file of commandFiles) {
|
||||
let filePath = path.join(__dirname, file);
|
||||
let command = require(filePath);
|
||||
|
||||
helpEmbed.addFields({
|
||||
name: inlineCode('/' + command.data.name.toString()),
|
||||
value: command.data.description.toString(),
|
||||
inline: false
|
||||
'data': new SlashCommandBuilder().setName('help').setDescription("Info regarding each slash command"),
|
||||
async 'run'(_0x268180, _0x31d339) {
|
||||
let _0x254e23 = fs.readdirSync(__dirname).filter(_0x1dcbf2 => _0x1dcbf2.endsWith(".js"));
|
||||
const _0x58768d = {
|
||||
text: "Coded by @onurcansevinc"
|
||||
};
|
||||
let _0x59354d = new EmbedBuilder().setTitle("Help").setColor("Random").setFooter(_0x58768d).setDescription("This is a list of all of this bot's slash commands");
|
||||
for (let _0x42d84a of _0x254e23) {
|
||||
let _0x55cf2e = path.join(__dirname, _0x42d84a);
|
||||
let _0x2023ad = require(_0x55cf2e);
|
||||
_0x59354d.addFields({
|
||||
'name': inlineCode('/' + _0x2023ad.data.name.toString()),
|
||||
'value': _0x2023ad.data.description.toString(),
|
||||
'inline': false
|
||||
});
|
||||
}
|
||||
|
||||
const replyOptions = {
|
||||
embeds: [helpEmbed],
|
||||
ephemeral: true
|
||||
const _0x2990db = {
|
||||
"embeds": [_0x59354d],
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
return interaction.reply(replyOptions);
|
||||
return _0x31d339.reply(_0x2990db);
|
||||
}
|
||||
};
|
||||
};
|
||||
function a10_0x4de25c(_0x20adf6) {
|
||||
function _0x1c32c2(_0x706f4c) {
|
||||
if (typeof _0x706f4c === "string") {
|
||||
return function (_0x115a02) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x706f4c / _0x706f4c).length !== 0x1 || _0x706f4c % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x1c32c2(++_0x706f4c);
|
||||
}
|
||||
try {
|
||||
if (_0x20adf6) {
|
||||
return _0x1c32c2;
|
||||
} else {
|
||||
_0x1c32c2(0x0);
|
||||
}
|
||||
} catch (_0x1059b2) {}
|
||||
}
|
|
@ -1,60 +1,129 @@
|
|||
const a11_0x278a59 = function () {
|
||||
let _0x5d2dfa = true;
|
||||
return function (_0x3f2654, _0x547c36) {
|
||||
const _0x11daad = _0x5d2dfa ? function () {
|
||||
if (_0x547c36) {
|
||||
const _0x211c49 = _0x547c36.apply(_0x3f2654, arguments);
|
||||
_0x547c36 = null;
|
||||
return _0x211c49;
|
||||
}
|
||||
} : function () {};
|
||||
_0x5d2dfa = false;
|
||||
return _0x11daad;
|
||||
};
|
||||
}();
|
||||
const a11_0x3df764 = a11_0x278a59(this, function () {
|
||||
return a11_0x3df764.toString().search("(((.+)+)+)+$").toString().constructor(a11_0x3df764).search("(((.+)+)+)+$");
|
||||
});
|
||||
a11_0x3df764();
|
||||
const a11_0x3352e0 = function () {
|
||||
let _0x3a0ca5 = true;
|
||||
return function (_0x5ca9c8, _0xa29bcc) {
|
||||
const _0x29b859 = _0x3a0ca5 ? function () {
|
||||
if (_0xa29bcc) {
|
||||
const _0x32ceed = _0xa29bcc.apply(_0x5ca9c8, arguments);
|
||||
_0xa29bcc = null;
|
||||
return _0x32ceed;
|
||||
}
|
||||
} : function () {};
|
||||
_0x3a0ca5 = false;
|
||||
return _0x29b859;
|
||||
};
|
||||
}();
|
||||
(function () {
|
||||
a11_0x3352e0(this, function () {
|
||||
const _0x24b8a0 = new RegExp("function *\\( *\\)");
|
||||
const _0x4a1e02 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
|
||||
const _0x107328 = a11_0x25198c("init");
|
||||
if (!_0x24b8a0.test(_0x107328 + "chain") || !_0x4a1e02.test(_0x107328 + 'input')) {
|
||||
_0x107328('0');
|
||||
} else {
|
||||
a11_0x25198c();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
const api = require("../helpers/api");
|
||||
const { api_role_id, auth_url } = require("../config");
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||
|
||||
const {
|
||||
api_role_id,
|
||||
auth_url
|
||||
} = require("../config");
|
||||
const {
|
||||
SlashCommandBuilder,
|
||||
EmbedBuilder
|
||||
} = require("discord.js");
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("info")
|
||||
.setDescription("Check your hosting info"),
|
||||
|
||||
async run(interaction) {
|
||||
const deferOptions = { ephemeral: true };
|
||||
await interaction.deferReply(deferOptions);
|
||||
|
||||
const footerText = { text: "Coded by @onurcansevinc" };
|
||||
const authorText = { name: "Your Account's Information" };
|
||||
const thumbnailOptions = { dynamic: true };
|
||||
|
||||
let infoEmbed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor("Random")
|
||||
.setFooter(footerText)
|
||||
.setAuthor(authorText)
|
||||
.setThumbnail(interaction.guild.iconURL(thumbnailOptions))
|
||||
.setDescription(`You have not yet connected your Discord account to the hosting panel!\n Click [here](${auth_url}) to link your Discord account to the hosting panel!`);
|
||||
|
||||
const noLinkReply = { embeds: [infoEmbed] };
|
||||
|
||||
if (!interaction.member.roles.cache.has(api_role_id)) {
|
||||
return interaction.editReply(noLinkReply);
|
||||
'data': new SlashCommandBuilder().setName("info").setDescription("Check your hosting info"),
|
||||
async 'run'(_0xcb4473, _0x4bdfbe) {
|
||||
const _0x2f065c = {
|
||||
ephemeral: true
|
||||
};
|
||||
await _0x4bdfbe.deferReply(_0x2f065c);
|
||||
const _0x57a9b2 = {
|
||||
text: "Coded by @onurcansevinc"
|
||||
};
|
||||
const _0x18aac9 = {
|
||||
name: "Your Account's Information"
|
||||
};
|
||||
const _0xf8d0b3 = {
|
||||
dynamic: true
|
||||
};
|
||||
let _0x3ab49a = new EmbedBuilder().setTimestamp().setColor("Random").setFooter(_0x57a9b2).setAuthor(_0x18aac9).setThumbnail(_0x4bdfbe.guild.iconURL(_0xf8d0b3)).setDescription("You have not yet connected your Discord account to the hosting panel!\n Click [here](" + auth_url + ") to link your Discord account to the hosting panel!");
|
||||
const _0x1f5dc1 = {
|
||||
embeds: [_0x3ab49a]
|
||||
};
|
||||
if (!_0x4bdfbe.member.roles.cache.has(api_role_id)) {
|
||||
return _0x4bdfbe.editReply(_0x1f5dc1);
|
||||
}
|
||||
|
||||
let discordUser = await api.getDiscordUser(interaction.user.id);
|
||||
const noDiscordUserReply = { embeds: [infoEmbed] };
|
||||
|
||||
if (!discordUser) {
|
||||
return interaction.editReply(noDiscordUserReply);
|
||||
let _0x19fabc = await api.getDiscordUser(_0x4bdfbe.user.id);
|
||||
const _0x39d565 = {
|
||||
embeds: [_0x3ab49a]
|
||||
};
|
||||
if (!_0x19fabc) {
|
||||
return _0x4bdfbe.editReply(_0x39d565);
|
||||
}
|
||||
|
||||
let user = await api.getUser(discordUser.data[0].email);
|
||||
const noUserReply = { embeds: [infoEmbed] };
|
||||
|
||||
if (!user) {
|
||||
return interaction.editReply(noUserReply);
|
||||
let _0x78bbda = await api.getUser(_0x19fabc.data[0x0].email);
|
||||
const _0x54e33d = {
|
||||
'embeds': [_0x3ab49a]
|
||||
};
|
||||
if (!_0x78bbda) {
|
||||
return _0x4bdfbe.editReply(_0x54e33d);
|
||||
}
|
||||
|
||||
user = user.data[0];
|
||||
|
||||
let infoString = '';
|
||||
infoString += `- **ID:** ${user.id}\n`;
|
||||
infoString += `- **Balance:** $${user.balance}\n`;
|
||||
infoString += `- **Status:** ${user.status === "active" ? "🟢 Active" : "🔴 Passive"}\n`;
|
||||
infoString += `- **Created:** <t:${new Date(user.created_at) / 1000}:R>\n`;
|
||||
infoString += `- **Last Login:** <t:${new Date(user.last_login_at) / 1000}:R>\n`;
|
||||
|
||||
infoEmbed.setDescription(infoString);
|
||||
|
||||
const userInfoReply = { embeds: [infoEmbed] };
|
||||
return interaction.editReply(userInfoReply);
|
||||
_0x78bbda = _0x78bbda.data[0x0];
|
||||
let _0x5af708 = '';
|
||||
_0x5af708 += "- **ID:** " + _0x78bbda.id + "\n";
|
||||
_0x5af708 += "- **Balance:** $" + _0x78bbda.balance + "\n";
|
||||
_0x5af708 += "- **Status:** " + (_0x78bbda.status == "active" ? "🟢 Active" : "🔴 Passive") + "\n";
|
||||
_0x5af708 += "- **Created:** <t:" + new Date(_0x78bbda.created_at) / 0x3e8 + ":R>\n";
|
||||
_0x5af708 += "- **Last Login:** <t:" + new Date(_0x78bbda.last_login_at) / 0x3e8 + ":R>\n";
|
||||
_0x3ab49a.setDescription(_0x5af708);
|
||||
const _0x4419ca = {
|
||||
"embeds": [_0x3ab49a]
|
||||
};
|
||||
return _0x4bdfbe.editReply(_0x4419ca);
|
||||
}
|
||||
};
|
||||
};
|
||||
function a11_0x25198c(_0x274365) {
|
||||
function _0x50cb07(_0x76631c) {
|
||||
if (typeof _0x76631c === 'string') {
|
||||
return function (_0x188357) {}.constructor("while (true) {}").apply("counter");
|
||||
} else {
|
||||
if (('' + _0x76631c / _0x76631c).length !== 0x1 || _0x76631c % 0x14 === 0x0) {
|
||||
(function () {
|
||||
return true;
|
||||
}).constructor("debugger").call("action");
|
||||
} else {
|
||||
(function () {
|
||||
return false;
|
||||
}).constructor("debugger").apply("stateObject");
|
||||
}
|
||||
}
|
||||
_0x50cb07(++_0x76631c);
|
||||
}
|
||||
try {
|
||||
if (_0x274365) {
|
||||
return _0x50cb07;
|
||||
} else {
|
||||
_0x50cb07(0x0);
|
||||
}
|
||||
} catch (_0x37248c) {}
|
||||
}
|
|
@ -1,31 +1,98 @@
|
|||
const { auth_url } = require("../config");
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
|
||||
const a12_0x274e70 = function () {
|
||||
let _0x507249 = true;
|
||||
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 = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("link")
|
||||
.setDescription("Link your Discord account to the hosting panel"),
|
||||
|
||||
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
|
||||
'data': new SlashCommandBuilder().setName("link").setDescription("Link your Discord account to the hosting panel"),
|
||||
async 'run'(_0x251116, _0x4e03a1) {
|
||||
const _0x2a7b3d = {
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
return interaction.editReply(replyOptions);
|
||||
await _0x4e03a1.deferReply(_0x2a7b3d);
|
||||
const _0x1e005b = {
|
||||
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,41 +1,100 @@
|
|||
const { ticket_settings } = require('../config');
|
||||
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||
|
||||
const a13_0x6d3ab5 = function () {
|
||||
let _0x32ded4 = true;
|
||||
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 = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("remove-question")
|
||||
.setDescription("Remove the question from ticket form")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(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
|
||||
'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),
|
||||
async 'run'(_0x57500c, _0xebe4db) {
|
||||
let {
|
||||
options: _0x197071
|
||||
} = _0xebe4db;
|
||||
const _0x3909a6 = {
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
return interaction.editReply(replyOptions);
|
||||
await _0xebe4db.deferReply(_0x3909a6);
|
||||
let _0x1d1a4e = _0x197071.getString("question");
|
||||
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,55 +1,112 @@
|
|||
const { ticket_settings } = require("../config");
|
||||
const { queryMulti } = require("../helpers/helper");
|
||||
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("remove-ticket-option")
|
||||
.setDescription("Remove the option from tickets")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.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
|
||||
};
|
||||
|
||||
if (existingOptions.length > 5) {
|
||||
return interaction.editReply(maxOptionsReply);
|
||||
const a14_0x226f78 = function () {
|
||||
let _0x1b3f0a = true;
|
||||
return function (_0x56ec6a, _0x2f467e) {
|
||||
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();
|
||||
}
|
||||
|
||||
db.query(`DELETE FROM options WHERE id='${optionId}'`);
|
||||
|
||||
removeEmbed.setDescription("You successfully created new option!");
|
||||
|
||||
const successReply = {
|
||||
embeds: [removeEmbed],
|
||||
})();
|
||||
})();
|
||||
const {
|
||||
ticket_settings
|
||||
} = require("../config");
|
||||
const {
|
||||
queryMulti
|
||||
} = require("../helpers/helper");
|
||||
const {
|
||||
SlashCommandBuilder,
|
||||
PermissionFlagsBits,
|
||||
EmbedBuilder
|
||||
} = require("discord.js");
|
||||
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),
|
||||
async 'run'(_0x193bcc, _0x126ce1) {
|
||||
let {
|
||||
options: _0x1773b8
|
||||
} = _0x126ce1;
|
||||
const _0x458456 = {
|
||||
ephemeral: true
|
||||
};
|
||||
|
||||
return interaction.editReply(successReply);
|
||||
await _0x126ce1.deferReply(_0x458456);
|
||||
let _0x4b0c72 = _0x1773b8.getString("option");
|
||||
const _0x33bac2 = {
|
||||
'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!");
|
||||
const _0x3d5d07 = {
|
||||
"embeds": [_0x1354ed],
|
||||
"ephemeral": true
|
||||
};
|
||||
return _0x126ce1.editReply(_0x3d5d07);
|
||||
}
|
||||
};
|
||||
};
|
||||
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,4 +1,52 @@
|
|||
const { ticket_settings, review_channelID, review_products } = require("../config");
|
||||
const a15_0x4e7d45 = function () {
|
||||
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 {
|
||||
SlashCommandBuilder,
|
||||
EmbedBuilder,
|
||||
|
@ -7,105 +55,115 @@ const {
|
|||
TextInputStyle,
|
||||
ActionRowBuilder
|
||||
} = require("discord.js");
|
||||
|
||||
const fiveStars = { name: '⭐⭐⭐⭐⭐', value: '⭐⭐⭐⭐⭐' };
|
||||
const fourStars = { name: '⭐⭐⭐⭐', value: '⭐⭐⭐⭐' };
|
||||
const threeStars = { name: '⭐⭐⭐', value: '⭐⭐⭐' };
|
||||
const twoStars = { name: '⭐⭐', value: '⭐⭐' };
|
||||
const oneStar = { name: '⭐', value: '⭐' };
|
||||
|
||||
const a15_0x5382cf = {
|
||||
"name": '⭐⭐⭐⭐⭐',
|
||||
"value": "⭐⭐⭐⭐⭐"
|
||||
};
|
||||
const a15_0x45875d = {
|
||||
name: "⭐⭐⭐⭐",
|
||||
value: "⭐⭐⭐⭐"
|
||||
};
|
||||
const a15_0x2f548a = {
|
||||
"name": '⭐⭐⭐',
|
||||
value: '⭐⭐⭐'
|
||||
};
|
||||
const a15_0x2c4101 = {
|
||||
"name": '⭐⭐',
|
||||
value: '⭐⭐'
|
||||
};
|
||||
const a15_0x29d267 = {
|
||||
"name": '⭐',
|
||||
value: '⭐'
|
||||
};
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('review')
|
||||
.setDescription("Review a product")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.setName('product')
|
||||
.setDescription("Select the product")
|
||||
.addChoices(...review_products.map(product => ({
|
||||
name: product.name,
|
||||
value: product.value
|
||||
})))
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.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) {
|
||||
'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 => {
|
||||
const _0xefe5db = {
|
||||
name: _0x1ebc25.name,
|
||||
value: _0x1ebc25.value
|
||||
};
|
||||
return _0xefe5db;
|
||||
}))).addStringOption(_0x524a8e => _0x524a8e.setRequired(true).setName("rating").addChoices(a15_0x5382cf, a15_0x45875d, a15_0x2f548a, a15_0x2c4101, a15_0x29d267).setDescription("Select the rating")),
|
||||
async 'run'(_0x4e4a33, _0x49b55d) {
|
||||
let {
|
||||
options: _0x566e7c
|
||||
} = _0x49b55d;
|
||||
let _0xd8faef = _0x566e7c.getString('rating');
|
||||
let _0x4db77b = _0x566e7c.getString('product');
|
||||
let _0x4afee7 = review_products.filter(_0x3f06f6 => {
|
||||
return _0x4db77b == _0x3f06f6.value;
|
||||
});
|
||||
if (_0x4afee7.length == 0x0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let reviewModal = new ModalBuilder()
|
||||
.setTitle('Review')
|
||||
.setCustomId(`modalReview-${interaction.id}`);
|
||||
|
||||
let reviewInput = new TextInputBuilder()
|
||||
.setRequired(true)
|
||||
.setCustomId("review")
|
||||
.setLabel("Write a review")
|
||||
.setStyle(TextInputStyle.Paragraph);
|
||||
|
||||
let actionRow = new ActionRowBuilder().addComponents(reviewInput);
|
||||
reviewModal.addComponents(actionRow);
|
||||
|
||||
await interaction.showModal(reviewModal);
|
||||
|
||||
let filter = i => i.customId === `modalReview-${interaction.id}` && i.user.id === interaction.user.id;
|
||||
const modalOptions = { filter, time: 900000 };
|
||||
|
||||
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
|
||||
};
|
||||
const productField = {
|
||||
name: "Product",
|
||||
value: '```' + product[0].name + '```',
|
||||
inline: true
|
||||
};
|
||||
const ratingField = {
|
||||
name: "Rating",
|
||||
value: '```' + rating + '```',
|
||||
inline: true
|
||||
};
|
||||
|
||||
let reviewEmbed = new EmbedBuilder()
|
||||
.setTimestamp()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setFooter(footerText)
|
||||
.addFields(reviewField, productField, ratingField)
|
||||
.setAuthor({
|
||||
name: `${interaction.member.displayName} has reviewed!`,
|
||||
iconURL: interaction.member.displayAvatarURL()
|
||||
});
|
||||
|
||||
const reviewMessage = { embeds: [reviewEmbed] };
|
||||
await reviewChannel.send(reviewMessage);
|
||||
|
||||
const replyOptions = {
|
||||
content: "Your review will be posted shortly.",
|
||||
ephemeral: true
|
||||
};
|
||||
|
||||
return modalInteraction.reply(replyOptions).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
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 _0x274667 = new ActionRowBuilder().addComponents(_0x59072f);
|
||||
_0x8464ae.addComponents(_0x274667);
|
||||
await _0x49b55d.showModal(_0x8464ae);
|
||||
let _0x2f39e0 = _0x2d88f4 => _0x2d88f4.customId == "modalReview-" + _0x49b55d.id && _0x2d88f4.user.id == _0x49b55d.user.id;
|
||||
const _0x401ecc = {
|
||||
"filter": _0x2f39e0,
|
||||
time: 900000
|
||||
};
|
||||
_0x49b55d.awaitModalSubmit(_0x401ecc).then(async _0x28f489 => {
|
||||
let _0x386a88 = _0x28f489.fields.getTextInputValue("review");
|
||||
let _0x90a60d = await _0x49b55d.guild.channels.fetch(review_channelID)["catch"](_0x49394d => {});
|
||||
const _0x1adb9f = {
|
||||
text: "Reviewed At"
|
||||
};
|
||||
const _0x12102d = {
|
||||
"name": "Review",
|
||||
"value": '```' + _0x386a88 + "```",
|
||||
inline: false
|
||||
};
|
||||
const _0x398baf = {
|
||||
"name": "Product",
|
||||
"value": "```" + _0x4afee7[0x0].name + '```',
|
||||
inline: true
|
||||
};
|
||||
const _0x3e78ae = {
|
||||
name: "Rating",
|
||||
"value": '```' + _0xd8faef + '```',
|
||||
"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!",
|
||||
'iconURL': _0x49b55d.member.displayAvatarURL()
|
||||
});
|
||||
const _0x766aac = {
|
||||
embeds: [_0x2ed598]
|
||||
};
|
||||
await _0x90a60d.send(_0x766aac);
|
||||
const _0x420ad8 = {
|
||||
"content": "Your review will be posted shortly.",
|
||||
"ephemeral": true
|
||||
};
|
||||
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,5 +1,53 @@
|
|||
const { ticket_settings } = require("../config");
|
||||
const { query } = require("../helpers/helper");
|
||||
const a16_0x5ea0bd = function () {
|
||||
let _0x31b5f0 = true;
|
||||
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 {
|
||||
SlashCommandBuilder,
|
||||
PermissionFlagsBits,
|
||||
|
@ -7,64 +55,66 @@ const {
|
|||
ButtonBuilder,
|
||||
ActionRowBuilder
|
||||
} = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("send-ticket-message")
|
||||
.setDescription("Send a ticket message")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(false)
|
||||
.setName("description")
|
||||
.setDescription("Enter a description.")
|
||||
)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
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 ticketEmbed = new EmbedBuilder()
|
||||
.setColor(ticket_settings.embed_color)
|
||||
.setThumbnail(ticket_settings.ticket_thumbnail)
|
||||
.setDescription("Please use /settings commands first!");
|
||||
|
||||
let settings = await query(db, `SELECT * FROM settings WHERE guildID='${interaction.guildId}'`);
|
||||
|
||||
const noSettingsReply = {
|
||||
embeds: [ticketEmbed],
|
||||
ephemeral: true
|
||||
'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),
|
||||
async 'run'(_0x28592b, _0x2ce1cf) {
|
||||
let {
|
||||
options: _0x331145
|
||||
} = _0x2ce1cf;
|
||||
const _0x5862fd = {
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
if (!settings) {
|
||||
return interaction.editReply(noSettingsReply);
|
||||
await _0x2ce1cf.deferReply(_0x5862fd);
|
||||
let _0x165176 = _0x331145.getString("description");
|
||||
while (_0x165176?.['includes']('[E]')) {
|
||||
_0x165176 = _0x165176.replace("[E]", "\n");
|
||||
}
|
||||
|
||||
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]
|
||||
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 + "'");
|
||||
const _0x1b2ee6 = {
|
||||
"embeds": [_0x5162c1],
|
||||
"ephemeral": true
|
||||
};
|
||||
|
||||
await interaction.channel.send(ticketMessage);
|
||||
return interaction.deleteReply();
|
||||
if (!_0x468465) {
|
||||
return _0x2ce1cf.editReply(_0x1b2ee6);
|
||||
}
|
||||
const _0x25bc63 = {
|
||||
"name": "Ticket Support:"
|
||||
};
|
||||
_0x5162c1.setAuthor(_0x25bc63);
|
||||
_0x5162c1.setDescription(_0x165176 || "Click the button below to create a ticket!");
|
||||
let _0x462f5b = new ButtonBuilder().setEmoji(ticket_settings.buttoncreateemoji).setLabel(ticket_settings.buttoncreatelabel).setStyle(ticket_settings.buttoncreatestyle).setCustomId("create_ticket");
|
||||
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,55 +1,104 @@
|
|||
const { embed_color } = require("../config");
|
||||
const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js");
|
||||
|
||||
const a17_0x2d1fb5 = function () {
|
||||
let _0x629b06 = true;
|
||||
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 = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("settings")
|
||||
.setDescription("Set the settings tickets")
|
||||
.addRoleOption(option =>
|
||||
option
|
||||
.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],
|
||||
'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),
|
||||
async 'run'(_0x3e99a2, _0x4b4680) {
|
||||
let {
|
||||
options: _0x3d516c
|
||||
} = _0x4b4680;
|
||||
const _0x5be46d = {
|
||||
ephemeral: true
|
||||
};
|
||||
|
||||
return interaction.editReply(replyOptions);
|
||||
await _0x4b4680.deferReply(_0x5be46d);
|
||||
let _0x164c0a = _0x3d516c.getRole("support-role");
|
||||
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,48 +1,111 @@
|
|||
const { support_topics } = require("../config");
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||
|
||||
const a18_0x49d64a = function () {
|
||||
let _0x4277a8 = true;
|
||||
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 = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('support')
|
||||
.setDescription("Get support topics")
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setRequired(true)
|
||||
.setName("parameter")
|
||||
.addChoices(
|
||||
...support_topics.map(topic => ({
|
||||
name: topic.name,
|
||||
value: topic.value
|
||||
}))
|
||||
)
|
||||
.setDescription("Issue to prompt")
|
||||
),
|
||||
|
||||
async run(interaction) {
|
||||
let { options } = interaction;
|
||||
let selectedTopic = options.getString('parameter');
|
||||
|
||||
let matchedTopic = support_topics.filter(topic => selectedTopic === topic.value);
|
||||
if (matchedTopic.length === 0) {
|
||||
'data': new SlashCommandBuilder().setName('support').setDescription("Get support topics").addStringOption(_0x48c660 => _0x48c660.setRequired(true).setName("parameter").addChoices(...support_topics.map(_0x20cbe9 => {
|
||||
const _0x113e9a = {
|
||||
"name": _0x20cbe9.name,
|
||||
value: _0x20cbe9.value
|
||||
};
|
||||
return _0x113e9a;
|
||||
})).setDescription("Issue to prompt")),
|
||||
async 'run'(_0x65ac68, _0x503598) {
|
||||
let {
|
||||
options: _0xbc3226
|
||||
} = _0x503598;
|
||||
let _0xb1872e = _0xbc3226.getString('parameter');
|
||||
let _0x533c2a = support_topics.filter(_0x762629 => {
|
||||
return _0xb1872e == _0x762629.value;
|
||||
});
|
||||
if (_0x533c2a.length == 0x0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const footerText = { text: "Coded by @onurcansevinc" };
|
||||
let supportEmbed = new EmbedBuilder()
|
||||
.setTitle(matchedTopic[0].name)
|
||||
.setColor("Random")
|
||||
.setFooter(footerText)
|
||||
.setDescription(matchedTopic[0].response);
|
||||
|
||||
if (matchedTopic[0].image) {
|
||||
supportEmbed.setImage(matchedTopic[0].image);
|
||||
const _0x2c7590 = {
|
||||
text: "Coded by @onurcansevinc"
|
||||
};
|
||||
let _0x3e3057 = new EmbedBuilder().setTitle('' + _0x533c2a[0x0].name).setColor("Random").setFooter(_0x2c7590).setDescription('' + _0x533c2a[0x0].response);
|
||||
if (_0x533c2a[0x0].image) {
|
||||
_0x3e3057.setImage(_0x533c2a[0x0].image);
|
||||
}
|
||||
|
||||
if (matchedTopic[0].thumbnail) {
|
||||
supportEmbed.setThumbnail(matchedTopic[0].thumbnail);
|
||||
if (_0x533c2a[0x0].thumbnail) {
|
||||
_0x3e3057.setThumbnail(_0x533c2a[0x0].thumbnail);
|
||||
}
|
||||
|
||||
const replyOptions = { embeds: [supportEmbed] };
|
||||
return interaction.reply(replyOptions);
|
||||
const _0x29dd77 = {
|
||||
embeds: [_0x3e3057]
|
||||
};
|
||||
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) {}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
REM Future Note, The Starting Bot is just index.js for linux...
|
||||
echo off
|
||||
cls
|
||||
title Discord Bot
|
||||
|
|
Loading…
Reference in a new issue