Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
devlordduck authored Nov 27, 2023
1 parent efe1319 commit ae14c78
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/handler/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ module.exports = {
if (Checker("ephemeral") || CheckerEmpty("ephemeral")) {
const trueorfalse = "true";

if (data && data.DataToReturnLol)
data.DataToReturnLol.ephemeral = checkBoolean(trueorfalse, true);
if (data && data.Return)
data.Return.ephemeral = checkBoolean(trueorfalse, true);
else
Options.ephemeral = checkBoolean(trueorfalse, true);
}
Expand All @@ -565,8 +565,8 @@ module.exports = {
if (Checker("tts"))
trueorfalse = option.split("{tts:")[1].split("}")[0];

if (data && data.DataToReturnLol)
data.DataToReturnLol.tts = checkBoolean(trueorfalse, true);
if (data && data.Return)
data.Return.tts = checkBoolean(trueorfalse, true);
else
Options.tts = checkBoolean(trueorfalse, true);
}
Expand All @@ -575,16 +575,16 @@ module.exports = {
let [subname, ...subvalues] = option.split("{allowedMentions:")[1].split("}")[0].addBrackets().split(":");
subname = subname?.trim()?.toLowerCase();

if (data.DataToReturnLol) {
if (!data.DataToReturnLol.allowedMentions)
data.DataToReturnLol.allowedMentions = {};
if (data.Return) {
if (!data.Return.allowedMentions)
data.Return.allowedMentions = {};

if (subname === "parse") {
data.DataToReturnLol.allowedMentions.parse = subvalues;
data.Return.allowedMentions.parse = subvalues;
} else if (subname === "roles") {
data.DataToReturnLol.allowedMentions.roles = subvalues;
data.Return.allowedMentions.roles = subvalues;
} else if (subname === "users") {
data.DataToReturnLol.allowedMentions.users = subvalues;
data.Return.allowedMentions.users = subvalues;
}
} else {
if (!Options.allowedMentions)
Expand All @@ -593,7 +593,7 @@ module.exports = {
if (subname === "parse") {
Options.allowedMentions.parse = subvalues;
} else if (subname === "roles") {
Options.DataToReturnLol.allowedMentions.roles = subvalues;
Options.Return.allowedMentions.roles = subvalues;
} else if (subname === "users") {
Options.allowedMentions.users = subvalues;
}
Expand All @@ -618,8 +618,8 @@ module.exports = {
if (Checker("fetchReply"))
trueorfalse = option.split("{fetchReply:")[1].split("}")[0];

if (data && data.DataToReturnLol)
data.DataToReturnLol.fetchReply = checkBoolean(trueorfalse, true);
if (data && data.Return)
data.Return.fetchReply = checkBoolean(trueorfalse, true);
else
Options.fetchReply = checkBoolean(trueorfalse, true);
}
Expand Down

0 comments on commit ae14c78

Please sign in to comment.