26.2 pre3
This commit is contained in:
1 parent
a7598d26aa
commit
4eef1867e3
26 files changed
+1221
-385
No files matched your search
@@ -33,9 +33,10 @@ function buildContainer(title, lines = []) {
|
||||
|
||||
container.addSeparatorComponents(new Discord.SeparatorBuilder().setDivider(true));
|
||||
|
||||
if (lines.length > 0) {
|
||||
const textContent = lines.filter(Boolean).join("\n").trim();
|
||||
if (textContent.length > 0) {
|
||||
container.addTextDisplayComponents(
|
||||
new Discord.TextDisplayBuilder().setContent(lines.join("\n")),
|
||||
new Discord.TextDisplayBuilder().setContent(textContent),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,22 +28,7 @@ const Command = require("../../Structures/Command.js");
|
||||
const TicketNumberID = require("../../Structures/TicketID.js");
|
||||
|
||||
async function isBlacklisted(userId) {
|
||||
let blacklistData;
|
||||
try {
|
||||
blacklistData = JSON.parse(
|
||||
fs.readFileSync("./Data/BlacklistedUsers.json", "utf8"),
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Error reading BlacklistedUsers.json:", error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!blacklistData || !Array.isArray(blacklistData.blacklistedUsers)) {
|
||||
console.error("blacklistedUsers is not defined or is not an array");
|
||||
return false;
|
||||
}
|
||||
|
||||
return blacklistData.blacklistedUsers.includes(userId);
|
||||
return typeof db.isUserBlacklisted === "function" ? db.isUserBlacklisted(userId) : false;
|
||||
}
|
||||
|
||||
async function getClockedInUsers(guild) {
|
||||
|
||||
@@ -116,6 +116,7 @@ module.exports = new Command({
|
||||
}
|
||||
|
||||
const departmentOptions = Object.entries(departments)
|
||||
.filter(([_, dept]) => dept && dept.Enabled !== false)
|
||||
.slice(0, 25)
|
||||
.map(([key, dept]) => ({
|
||||
label: dept.Name || key,
|
||||
|
||||
Reference in new issue
Block a user