From 6889634ed023db405cc0ed6a34ac88daa45505d5 Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:50:03 -0600 Subject: [PATCH 1/6] Add lesdar field to idDarSchema --- mongo/models/idDarSchema.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mongo/models/idDarSchema.js b/mongo/models/idDarSchema.js index 5b07d50..3d6db28 100644 --- a/mongo/models/idDarSchema.js +++ b/mongo/models/idDarSchema.js @@ -22,6 +22,10 @@ const idDarSchema = new mongoose.Schema({ type: [radarEntrySchema], default: [], }, + lesdar: { + type: [radarEntrySchema], + default: [], + }, bidar: { type: [radarEntrySchema], default: [], From d2659c2d7fe9616b22f9bba1198fc0efb0aac2c4 Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:51:38 -0600 Subject: [PATCH 2/6] Add lesdar command to check user's lesbian meter --- src/commands/fun/lesdar.js | 90 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/commands/fun/lesdar.js diff --git a/src/commands/fun/lesdar.js b/src/commands/fun/lesdar.js new file mode 100644 index 0000000..952b3a7 --- /dev/null +++ b/src/commands/fun/lesdar.js @@ -0,0 +1,90 @@ +const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); +const commandLogging = require("../../config/logging/commandlog"); +const darlogging = require("../../config/logging/darlog"); +const DarList = require("../../../mongo/models/idDarSchema"); + +const utility_functions = { + chance: function (probability) { + return Math.random() <= probability; + }, + number_format_commas: function (number) { + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + }, +}; + +module.exports = { + data: new SlashCommandBuilder() + .setName("lesdar") + .setDescription("How lesbian are you?") + .addUserOption((option) => + option + .setName("target") + .setDescription("See how lesbian a user is") + .setRequired(false) + ), + + async execute(interaction, client) { + await interaction.deferReply(); + + const targetUser = + interaction.options.getUser("target") || interaction.user; + const userName = targetUser.username; + const userid = targetUser.id; + + let meter; + try { + const darList = await DarList.findOne(); + + if (darList) { + const lesdarEntry = darList.lesdar.find( + (entry) => entry.userid === userid + ); + + if (lesdarEntry) { + meter = lesdarEntry.meter; + } else { + meter = Math.floor(Math.random() * 101); + if (utility_functions.chance(0.0001)) { + meter = Math.floor(Math.random() * 2354082) + 500; + if (utility_functions.chance(0.5)) { + meter *= -1; + } + } + } + } else { + meter = Math.floor(Math.random() * 101); + + if (utility_functions.chance(0.0001)) { + meter = Math.floor(Math.random() * 2354082) + 500; + if (utility_functions.chance(0.5)) { + meter *= -1; + } + } + } + } catch (err) { + console.error(err); + meter = Math.floor(Math.random() * 101); + } + + const embed = new EmbedBuilder() + .setTitle(`How lesbian is ${userName}?`) + .setDescription( + `<@${userid}> is **${utility_functions.number_format_commas( + meter + )}% lesbian!**` + ) + .setColor(0xff00ae) + .setFooter({ + text: "The bot has 99.99% accuracy rate on checking users lesbianness", + }); + + try { + await interaction.editReply({ embeds: [embed] }); // Edit the deferred reply + } catch (error) { + console.error("Error sending response:", error); + } + + await commandLogging(client, interaction); + await darlogging(client, "Lesdar", userName, meter, userid); + }, +}; From 1cfd40992f27516915904885cfa204be08748a00 Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:52:31 -0600 Subject: [PATCH 3/6] Add User Lesdar context menu command --- src/commands/fun/userlesdar.js | 77 ++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/commands/fun/userlesdar.js diff --git a/src/commands/fun/userlesdar.js b/src/commands/fun/userlesdar.js new file mode 100644 index 0000000..74c3c67 --- /dev/null +++ b/src/commands/fun/userlesdar.js @@ -0,0 +1,77 @@ +const { + EmbedBuilder, + ContextMenuCommandBuilder, + ApplicationCommandType, +} = require("discord.js"); +const DarList = require("../../../mongo/models/idDarSchema"); +const darlogging = require("../../config/logging/darlog"); + +const utility_functions = { + chance: function (probability) { + return Math.random() <= probability; + }, + number_format_commas: function (number) { + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + }, +}; + +module.exports = { + data: new ContextMenuCommandBuilder() + .setName("User Lesdar") + .setType(ApplicationCommandType.User), + + async execute(interaction, client) { + const targetUser = interaction.targetUser; + const userName = targetUser.username; + const userid = targetUser.id; + + let meter; + try { + const darList = await DarList.findOne(); + + if (darList) { + const gaydarEntry = darList.lesdar.find( + (entry) => entry.userid === userid + ); + + if (gaydarEntry) { + meter = gaydarEntry.meter; + } else { + meter = Math.floor(Math.random() * 101); + if (utility_functions.chance(0.0001)) { + meter = Math.floor(Math.random() * 2354082) + 500; + if (utility_functions.chance(0.5)) { + meter *= -1; + } + } + } + } else { + meter = Math.floor(Math.random() * 101); + if (utility_functions.chance(0.0001)) { + meter = Math.floor(Math.random() * 2354082) + 500; + if (utility_functions.chance(0.5)) { + meter *= -1; + } + } + } + } catch (err) { + console.error(err); + meter = Math.floor(Math.random() * 101); + } + + const embed = new EmbedBuilder() + .setTitle(`How lesbian is ${userName}?`) + .setDescription( + `<@${userid}> is **${utility_functions.number_format_commas( + meter + )}% lesbian!**` + ) + .setColor(0xff00ae) + .setFooter({ + text: "The bot has 99.99% accuracy rate on checking users lesbianness", + }); + + await interaction.reply({ embeds: [embed] }); + await darlogging(client, "User Gaydar", userName, meter, userid); + }, +}; From 304b1439f1d4733da68db0e5948e9c41887859be Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:53:46 -0600 Subject: [PATCH 4/6] Add userlesdar command to bot.js --- src/bot.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bot.js b/src/bot.js index 8195f8b..698238a 100644 --- a/src/bot.js +++ b/src/bot.js @@ -35,6 +35,7 @@ const userprofile = require("./commands/Profile/userprofile.js"); const usergaydar = require("./commands/Fun/usergaydar.js"); const usertransdar = require("./commands/Fun/usertransdar.js"); const userqueerdar = require("./commands/Fun/userqueerdar.js"); +const userlesdar = require("./commands/Fun/userlesdar.js"); const useravatar = require("./commands/Avatar/useravatar-view.js"); module.exports = (client) => { @@ -246,6 +247,7 @@ module.exports = (client) => { const handlers = { "User Profile": userprofile, "User Gaydar": usergaydar, + "User Lesdar": userlesdar, "User Transdar": usertransdar, "User Queerdar": userqueerdar, "User Avatar-view": useravatar, From 8a4ea7facaa99b12c52f3c24d60c3d8d9784e9c5 Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:02:40 -0600 Subject: [PATCH 5/6] Make sure --- src/commands/fun/lesdar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/fun/lesdar.js b/src/commands/fun/lesdar.js index 952b3a7..f2fb0db 100644 --- a/src/commands/fun/lesdar.js +++ b/src/commands/fun/lesdar.js @@ -69,7 +69,7 @@ module.exports = { const embed = new EmbedBuilder() .setTitle(`How lesbian is ${userName}?`) .setDescription( - `<@${userid}> is **${utility_functions.number_format_commas( + `<@${userid}> is **${userId === "1201827969585393676" ? "1000000000000000000000000" : utility_functions.number_format_commas( meter )}% lesbian!**` ) From 3097685320cb32314d93b0a547fa1f4061190392 Mon Sep 17 00:00:00 2001 From: giftedly <52332868+giftedl@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:03:35 -0600 Subject: [PATCH 6/6] Make sure Lia gets the lesbianism boost --- src/commands/fun/lesdar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/fun/lesdar.js b/src/commands/fun/lesdar.js index f2fb0db..ad2d710 100644 --- a/src/commands/fun/lesdar.js +++ b/src/commands/fun/lesdar.js @@ -69,7 +69,7 @@ module.exports = { const embed = new EmbedBuilder() .setTitle(`How lesbian is ${userName}?`) .setDescription( - `<@${userid}> is **${userId === "1201827969585393676" ? "1000000000000000000000000" : utility_functions.number_format_commas( + `<@${userid}> is **${userid === "1201827969585393676" ? "1000000000000000000000000" : utility_functions.number_format_commas( meter )}% lesbian!**` )