zer0 negative☽
zer0 negative☽
DIAdiscord.js - Imagine an app
Created by zer0 negative☽ on 7/9/2023 in #djs-questions
Anchor GUI Menu to bottom
Is it possible to anchor a GUI menu to the bottom of the chat so when messages from other users come in it doesn't push it up?
3 replies
DIAdiscord.js - Imagine an app
Created by zer0 negative☽ on 7/9/2023 in #djs-questions
StringSelectMenuBuilder
6 replies
DIAdiscord.js - Imagine an app
Created by zer0 negative☽ on 7/5/2023 in #djs-questions
bot can't manage roles on user
THE ERROR: TypeError: Cannot read properties of undefined (reading 'id') at get cache [as cache] (C:\Users\2DF2ZDT\Documents\New folder\node_modules\di ers\GuildMemberRoleManager.js:37:101) at GuildMemberRoleManager.add (C:\Users\2DF2ZDT\Documents\New folder\node_modu \managers\GuildMemberRoleManager.js:134:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) THE CODE: // Grant the user the "1 character token" role here // Replace ROLE_ID with the actual ID of the role const roleId = '1126221526161686679'; const member = await interaction.guild.members.fetch(userId); member.roles .add(roleId) .then(() => { interaction.reply('Character created. You have been granted the "1 character token" role.'); }) .catch((err) => { console.error(err); interaction.reply('Character created. Failed to grant role.'); }); My intents are there in the index.js file. I checked the role ID. It can get the userId and post it to the database but it can't manage the user's roles. I checked the permissions on my bot it has administrator permission so it should be able to do everything. I checked that the bot's heirarchy is above everything else. I was able to console log the user so it seems like it's just a permissions problem related to manage guild member roles but I don't understand because I have the bot on admin privelage. Stumped on this one.
14 replies