Tuevon
Tuevon
DIAdiscord.js - Imagine an app
Created by unnreaal on 8/27/2023 in #djs-questions
Group DM recipients
I'm hoping just to get the recipients, or even to just determine if the bot is in a group DM.
21 replies
DIAdiscord.js - Imagine an app
Created by unnreaal on 8/27/2023 in #djs-questions
Group DM recipients
I'd actually like to re-open this since it's been a good amount of time, but I'm noticing that the DDevs resource still lists Group DMs in its documentation. Am I missing something or does <DM Channel>.recipient actually return a user/member manager or an array/collection of IDs? If whoever answers is able to ping me it would be much appreciated. Thank you!
21 replies
DIAdiscord.js - Imagine an app
Created by bunningtonfoot on 7/3/2024 in #djs-questions
Randomly Started Happening
25 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
@qjuh Thank you for your help!
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
So it's working now except for that timer.
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
Looks like I was overcomplicating things… by a lot
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
Oh okay, so when MessagePayload refers to this in its create method, it's not able to access that interaction?
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
I was trying to call const timer = require("node:timers/promises").setTimeout; and it had no issues. Are arrays in particular the problem?
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
Okay so just trying to understand the first part, are you saying that functions/methods only work with invoked and can't be stored?
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
// class 'AutodeleteReply' is invoked in function 'replyAutoDelete':
const {
AutodeleteReply,
} = require("../embed_templates/communications/comms_embeds");

async function replyAutodelete(
interaction,
client,
messageContent = "",
expirationSeconds = 2,
ephemeral = false,
embeds = Array(0),
) {
const reply = new AutodeleteReply(
interaction,
client,
expirationSeconds,
messageContent,
ephemeral,
embeds,
);

reply.post();
}

module.exports = { replyAutodelete };
// class 'AutodeleteReply' is invoked in function 'replyAutoDelete':
const {
AutodeleteReply,
} = require("../embed_templates/communications/comms_embeds");

async function replyAutodelete(
interaction,
client,
messageContent = "",
expirationSeconds = 2,
ephemeral = false,
embeds = Array(0),
) {
const reply = new AutodeleteReply(
interaction,
client,
expirationSeconds,
messageContent,
ephemeral,
embeds,
);

reply.post();
}

module.exports = { replyAutodelete };
And itself is invoked elsewhere like so:
try {
replyAutodelete(
interaction,
client,
"Thank you for testing this feature.",
3,
true,
[]
);
} catch (replyAutodeleteProcessError) {
logErrorMessage(
interaction,
client,
"Reply-Autodelete",
roleMention("1109019453372518460"),
codeBlock(replyAutodeleteProcessError)
);
}
try {
replyAutodelete(
interaction,
client,
"Thank you for testing this feature.",
3,
true,
[]
);
} catch (replyAutodeleteProcessError) {
logErrorMessage(
interaction,
client,
"Reply-Autodelete",
roleMention("1109019453372518460"),
codeBlock(replyAutodeleteProcessError)
);
}
But the catch block is not being triggered here. Edit: The support function nudf:
function nudf(value) {
return value === null || value === undefined;
}
function nudf(value) {
return value === null || value === undefined;
}
10 replies
DIAdiscord.js - Imagine an app
Created by Tuevon on 5/24/2023 in #djs-questions
[SOLVED] Unable to source error…
10 replies