scotty
scotty
DIAdiscord.js - Imagine an app
Created by scotty on 7/18/2023 in #djs-questions
Bot not editing embed as expected
Returning 50 isn’t an issue as the channel is locked, message could would never exceed ≈5, just need to ensure that the embed still updates if a user posts under it, and if that did happen there would only ever be up to 5ish messages under the embed anyway
4 replies
DIAdiscord.js - Imagine an app
Created by scotty on 6/10/2023 in #djs-questions
Detecting role removal
Ahh, makes sense. Thank you!
6 replies
DIAdiscord.js - Imagine an app
Created by scotty on 5/7/2023 in #djs-questions
Command not running despite meeting the requirements
thank you!
8 replies
DIAdiscord.js - Imagine an app
Created by scotty on 5/7/2023 in #djs-questions
Command not running despite meeting the requirements
yep feel so stupid 🤦 fixed it with
const rankRoles = {
"I": "1051888647961575464",
"C": "989618534009159740",
"E": "989618534629916732",
"RM": "1069139407204007986",
"DD": "1056906050403573760",
"BD": "899869665780719667"
};
const selectedRank = interaction.options.getString("rank");
const selectedRoleId = rankRoles[selectedRank];

if (!interaction.member.roles.cache.has(selectedRoleId)) {
await interaction.reply("You do not have permission to select that rank!");
return;
}
const rankRoles = {
"I": "1051888647961575464",
"C": "989618534009159740",
"E": "989618534629916732",
"RM": "1069139407204007986",
"DD": "1056906050403573760",
"BD": "899869665780719667"
};
const selectedRank = interaction.options.getString("rank");
const selectedRoleId = rankRoles[selectedRank];

if (!interaction.member.roles.cache.has(selectedRoleId)) {
await interaction.reply("You do not have permission to select that rank!");
return;
}
8 replies