AthenaRebel
AthenaRebel
DIAdiscord.js - Imagine a boo! 👻
Created by AthenaRebel on 2/1/2024 in #djs-questions
Thread Question
So I have a command where a thread is opened by a bot via a command (/support), however I was wondering if it is possible to when the thread is opened my threadCreate event to detect who the user is that triggered the command? For example : user -> /support thread opens -> threadCreate event triggered threadCreate detects user who triggered /support
4 replies
DIAdiscord.js - Imagine a boo! 👻
Created by AthenaRebel on 2/1/2024 in #djs-questions
How would I go about getting the currently applied tags in a Forums channel?
I tries this and kept getting Failed to change thread tags: TypeError: Cannot read properties of undefined (reading 'fetch')
try {
if (member.roles.cache.has(botRoleId)) {
return;
}

const currentTags = await thread.tags.fetch();
const currentTagIds = currentTags.map(tag => tag.id);

if (member.roles.cache.has(supportRoleId)) {
if (!currentTagIds.includes(staffResponseTag)) {
await thread.setArchived(false);
await thread.setAppliedTags([staffResponseTag]);
}
} else {
if (!currentTagIds.includes(creatorResponseTag)) {
await thread.setArchived(false);
await thread.setAppliedTags([creatorResponseTag]);
}
}
} catch (error) {
console.error('Failed to change thread tags:', error);
}
}
try {
if (member.roles.cache.has(botRoleId)) {
return;
}

const currentTags = await thread.tags.fetch();
const currentTagIds = currentTags.map(tag => tag.id);

if (member.roles.cache.has(supportRoleId)) {
if (!currentTagIds.includes(staffResponseTag)) {
await thread.setArchived(false);
await thread.setAppliedTags([staffResponseTag]);
}
} else {
if (!currentTagIds.includes(creatorResponseTag)) {
await thread.setArchived(false);
await thread.setAppliedTags([creatorResponseTag]);
}
}
} catch (error) {
console.error('Failed to change thread tags:', error);
}
}
5 replies
DIAdiscord.js - Imagine a boo! 👻
Created by AthenaRebel on 12/29/2023 in #djs-questions
Modal not responding
My modals were working all night yesterday, but when I attempted to run the commands today I continuously got "Something went wrong try again later". After thinking it was the command I made a new one to test modal form configuration but no matter which way I make the modal form nothing worked, and I kept getting the error. I am getting no console errors and no rate limit errors.
12 replies
DIAdiscord.js - Imagine a boo! 👻
Created by AthenaRebel on 12/28/2023 in #djs-questions
TypeError: Modal is not a constructor
I am recieving this error even though I am fully up to date with latest release?
6 replies