GMDMCD
GMDMCD
DIAdiscord.js - Imagine an app
Created by GMDMCD on 9/15/2023 in #djs-questions
Role in SlashCommand showing @Undefined
No description
3 replies
DIAdiscord.js - Imagine an app
Created by GMDMCD on 9/14/2023 in #djs-questions
Edit message in thread
I'm trying to edit a message inside a thread, I've channelID(Contains thread), threadID(Contains message) and messageID, I'm not able to figure out how to do so. I'm trying something like this but no luck
const tmp = await interaction.guild.channels.cache.get(threadId).fetchMessageById(messageId);
const tmp = await interaction.guild.channels.cache.get(threadId).fetchMessageById(messageId);
6 replies
DIAdiscord.js - Imagine an app
Created by GMDMCD on 9/12/2023 in #djs-questions
Escape Character causing issue in fetching user info
I'm trying to fetch member info using the globalName of users but if a globalName contains a escape character it fails to fetch the info.
[ 'GMDMCD', 'Adi\\_918' ]
[ 'GMDMCD', 'Adi\\_918' ]
let user = client.users.cache.find(user => user.globalName == racers[0]);
let user = client.users.cache.find(user => user.globalName == racers[0]);
for the first name this code is able to fetch member info but fails for second one.
7 replies
DIAdiscord.js - Imagine an app
Created by GMDMCD on 8/26/2023 in #djs-questions
Creating a message based on Roles
I'm trying to create a message which is essentially a lineup of all players. I'm trying to do this task by fetching their roles from Discord Server. Problem happens when using a command that message needs to be updated due to some changes and it misses few people even though proper roles are present. const role = interaction.guild.roles.cache.find(role => role.id === teamRoleIDs[i]); const totalMembers = role.members.map(m => m.id);
3 replies