Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions commands/chastity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js");
const { getChastity, assignChastity, getChastityName } = require("./../functions/vibefunctions.js");
const { calculateTimeout } = require("./../functions/timefunctions.js");
const { getHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js");
const { getPronouns } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js");
const { getText } = require("./../functions/textfunctions.js");
Expand Down Expand Up @@ -90,7 +90,7 @@ module.exports = {
if (braorbelt == "chastitybelt") {
// They are trying to put on a chastity belt.
// Check if the wearer is in an armbinder - if they are, block them.
if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, chastityuser.id)) {
data.heavy = true;
if (getChastity(interaction.user.id)) {
// User is in some form of heavy bondage and already has a chastity belt
Expand Down Expand Up @@ -155,7 +155,7 @@ module.exports = {
} else {
// They are trying to put on a chastity bra.
// Check if the wearer is in an armbinder - if they are, block them.
if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, chastityuser.id)) {
data.heavy = true;
if (getChastityBra(interaction.user.id)) {
// User is in some form of heavy bondage and already has a chastity belt
Expand Down
6 changes: 3 additions & 3 deletions commands/collar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js");
const { getHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js");
const { getCollar, assignCollar, collartypes, getCollarName, getBaseCollar, canAccessCollar } = require("./../functions/collarfunctions.js");
const { getPronouns } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent, collarPermModal } = require("./../functions/interactivefunctions.js");
Expand Down Expand Up @@ -80,7 +80,7 @@ module.exports = {
},
};

if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, interaction.user.id)) {
data.heavy = true;
if (getCollar(interaction.user.id)) {
data.collar = true;
Expand Down Expand Up @@ -138,7 +138,7 @@ module.exports = {
},
};

if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, interaction.user.id)) {
data.heavy = true;
if (getCollar(interaction.user.id)) {
data.collar = true;
Expand Down
10 changes: 5 additions & 5 deletions commands/collarequip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js");
const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js");
const { getCollar, getCollarPerm, canAccessCollar } = require("./../functions/collarfunctions.js");
const { getChastity, assignChastity, getChastityName, getChastityBraName, } = require("./../functions/vibefunctions.js");
const { getMittenName, assignMitten, getMitten, mittentypes, getBaseMitten } = require("./../functions/gagfunctions.js");
Expand All @@ -15,8 +15,8 @@ const { getUserTags } = require("../functions/configfunctions.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("collarequip")
.setDescription(`Put chastity, mittens or heavy bondage on someone with a collar`)
.addSubcommand((subcommand) =>
.setDescription(`Put chastity someone with a collar`)
/*.addSubcommand((subcommand) =>
subcommand
.setName("mittens")
.setDescription("Apply Mittens...")
Expand All @@ -29,7 +29,7 @@ module.exports = {
.setDescription("Apply Heavy Bondage...")
.addUserOption((opt) => opt.setName("user").setDescription("To who?").setRequired(true))
.addStringOption((opt) => opt.setName("type").setDescription("Which Restraint?").setAutocomplete(true)),
)
)*/
.addSubcommand((subcommand) =>
subcommand
.setName("chastity")
Expand Down Expand Up @@ -278,7 +278,7 @@ module.exports = {
}
}

if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, collareduser.id)) {
data.heavy = true;
interaction.reply(getText(data));
} else if (collareduser == interaction.user) {
Expand Down
4 changes: 2 additions & 2 deletions commands/corset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js");
const { getChastity, getVibe, assignVibe, canAccessChastity } = require("./../functions/vibefunctions.js");
const { getHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js");
const { getPronouns } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js");
const { getCorset, assignCorset, getBaseCorset } = require("./../functions/corsetfunctions.js");
Expand Down Expand Up @@ -110,7 +110,7 @@ module.exports = {
if (blocked) {
return;
}
if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, corsetuser.id)) {
// In heavy bondage, fail
data.heavy = true;
if (corsetuser == interaction.user) {
Expand Down
6 changes: 3 additions & 3 deletions commands/gag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("disco
const fs = require("fs");
const path = require("path");
const { getGag, assignGag, getMitten, getGagLast } = require("./../functions/gagfunctions.js");
const { getHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js");
const { getPronouns } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent, handleExtremeRestraint } = require("./../functions/interactivefunctions.js");
const { getText, getTextGeneric } = require("./../functions/textfunctions.js");
Expand Down Expand Up @@ -118,7 +118,7 @@ module.exports = {
return;
}

// REFLECT
// REFLECT // We may need to move this to within the nomitten section.
if (gaggeduser.id == process.client.user.id) {
data.gagreflect = true;
data.textdata.interactionuser = process.client.user;
Expand All @@ -127,7 +127,7 @@ module.exports = {
gaggeduser = interaction.user;
}

if (getHeavy(interactionuser.id)) {
if (!getHeavyBound(interaction.user.id, gaggeduser.id)) {
// in heavy bondage, cant equip
data.heavy = true;
if (interactionuser == gaggeduser) {
Expand Down
137 changes: 86 additions & 51 deletions commands/heavy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js");
const { calculateTimeout } = require("./../functions/timefunctions.js");
const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy } = require("./../functions/heavyfunctions.js");
const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy, getHeavyRestrictions, getHeavyBound, getHeavyList } = require("./../functions/heavyfunctions.js");
const { getPronouns } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent, handleExtremeRestraint, handleMajorRestraint } = require("./../functions/interactivefunctions.js");
const { getText } = require("./../functions/textfunctions.js");
Expand All @@ -21,6 +21,7 @@ module.exports = {
async autoComplete(interaction) {
try {
const focusedValue = interaction.options.getFocused();
let chosenuserid = interaction.options.get("user")?.value ?? interaction.user.id; // Note we can only retrieve the user ID here!
let autocompletes = process.heavytypes.filter((f) => !getBaseHeavy(f.value).noself);
let matches = didYouMean(focusedValue, autocompletes, {
matchPath: ['name'],
Expand All @@ -31,7 +32,7 @@ module.exports = {
if (matches.length == 0) {
matches = autocompletes;
}
let tags = getUserTags(interaction.user.id);
let tags = getUserTags(chosenuserid);
let newsorted = [];
matches.forEach((f) => {
let tagged = false;
Expand Down Expand Up @@ -101,7 +102,7 @@ module.exports = {
return;
}

if (getHeavy(interaction.user.id)) {
if (!getHeavyBound(interaction.user.id, targetuser.id)) {
data.heavy = true;
interaction.reply(getText(data));
} else {
Expand All @@ -114,71 +115,105 @@ module.exports = {
interactionuser = process.client.user;
targetuser = interaction.user;
}
// This disaster of a function lol
let canwear = true;
let blocker;
let blockertype;
console.log(getHeavyList(targetuser.id).map((h) => getBaseHeavy(h.type)))
getHeavyList(targetuser.id).map((h) => getBaseHeavy(h.type)).forEach((h) => {
h.heavytags.forEach((t) => {
if (getBaseHeavy(heavychoice).heavytags.includes(t)) {
canwear = false
blocker = h
blockertype = t
}
})
})
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
if ((interaction.user.id != targetuser.id) || data.textdata.interactionuser == process.client.user) {
if ((interaction.user.id != targetuser.id) || (data.textdata.interactionuser == process.client.user)) {
// Someone else!
data.other = true;
await handleMajorRestraint(interaction.user, targetuser, "heavy", heavychoice).then(async () => {
if (canwear) {
data.canwear = true
await handleMajorRestraint(interaction.user, targetuser, "heavy", heavychoice).then(async () => {
await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then(
async (success) => {
await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true, flags: MessageFlags.Ephemeral });
await interaction.followUp(getText(data));
assignHeavy(targetuser.id, heavychoice, interaction.user.id);
},
async (reject) => {
let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`;
if (reject == "Disabled") {
nomessage = `${convertheavy(heavychoice)} is currently disabled in ${targetuser}'s Extreme options.`;
}
if (reject == "Error") {
nomessage = `Something went wrong - Submit a bug report!`;
}
if (reject == "NoDM") {
nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`;
}
await interaction.followUp({ content: nomessage });
},
);
},
async (reject) => {
let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`;
if (reject == "Disabled") {
nomessage = `${targetuser} has disabled being bound in major restraints without a collar.`;
}
if (reject == "Error") {
nomessage = `Something went wrong - Submit a bug report!`;
}
if (reject == "NoDM") {
nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`;
}
if (reject == "Cooldown") {
nomessage = `${targetuser} has blocked major bondage restraints for now. Please try again in the future.`;
}
await interaction.followUp({ content: nomessage });
})
}
else {
data.nocanwear = true
data[blockertype] = true
data.textdata.c4 = blocker.name
await interaction.followUp(`Attempting to equip a ${convertheavy(heavychoice)}...`)
await interaction.followUp(getText(data));
}
}
else {
data.self = true;
if (canwear) {
data.canwear = true
await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then(
async (success) => {
await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true, flags: MessageFlags.Ephemeral });
await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true });
await interaction.followUp(getText(data));
assignHeavy(targetuser.id, heavychoice, interaction.user.id);
assignHeavy(interaction.user.id, heavychoice, interaction.user.id);
},
async (reject) => {
let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`;
let nomessage = `You rejected the ${convertheavy(heavychoice)}.`;
if (reject == "Disabled") {
nomessage = `${convertheavy(heavychoice)} is currently disabled in ${targetuser}'s Extreme options.`;
nomessage = `${convertheavy(heavychoice)} is currently disabled in your Extreme options - **/config**`;
}
if (reject == "Error") {
nomessage = `Something went wrong - Submit a bug report!`;
}
if (reject == "NoDM") {
nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`;
nomessage = `Something went wrong sending a DM to you, or you have DMs from this server disabled. Cannot obtain consent for this restraint.`;
}
await interaction.followUp({ content: nomessage });
await interaction.followUp(nomessage);
},
);
},
async (reject) => {
let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`;
if (reject == "Disabled") {
nomessage = `${targetuser} has disabled being bound in major restraints without a collar.`;
}
if (reject == "Error") {
nomessage = `Something went wrong - Submit a bug report!`;
}
if (reject == "NoDM") {
nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`;
}
if (reject == "Cooldown") {
nomessage = `${targetuser} has blocked major bondage restraints for now. Please try again in the future.`;
}
await interaction.followUp({ content: nomessage });
})
}
else {
data.self = true;
await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then(
async (success) => {
await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true });
await interaction.followUp(getText(data));
assignHeavy(interaction.user.id, heavychoice, interaction.user.id);
},
async (reject) => {
let nomessage = `You rejected the ${convertheavy(heavychoice)}.`;
if (reject == "Disabled") {
nomessage = `${convertheavy(heavychoice)} is currently disabled in your Extreme options - **/config**`;
}
if (reject == "Error") {
nomessage = `Something went wrong - Submit a bug report!`;
}
if (reject == "NoDM") {
nomessage = `Something went wrong sending a DM to you, or you have DMs from this server disabled. Cannot obtain consent for this restraint.`;
}
await interaction.followUp(nomessage);
},
);
}
else {
data.nocanwear = true
data[blockertype] = true
data.textdata.c4 = blocker.name
await interaction.followUp(`Attempting to equip a ${convertheavy(heavychoice)}...`)
await interaction.followUp(getText(data));
}
}
}
} catch (err) {
Expand Down
4 changes: 2 additions & 2 deletions commands/letgo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js");
const { their } = require("./../functions/pronounfunctions.js");
const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js");
const { tryOrgasm, getChastity, setArousalCooldown } = require("../functions/vibefunctions.js");
const { getHeavy } = require("../functions/heavyfunctions.js");
const { getHeavy, getHeavyBound } = require("../functions/heavyfunctions.js");
const { getText } = require("./../functions/textfunctions.js");

module.exports = {
Expand Down Expand Up @@ -37,7 +37,7 @@ module.exports = {
return;
}

const heavy = getHeavy(interaction.user.id);
const heavy = !getHeavyBound(interaction.user.id, interaction.user.id);
if (heavy) {
data.heavy = true;
interaction.reply(getText(data));
Expand Down
Loading