Embed Message

Hi everyone, I need help regarding this string, apparently when someone joins the server, the embed message doesn't appear and doesn't even assign the role, could it be something related to the intents?
29 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
thaferra
thaferraOP13mo ago
https://sourceb.in/xxBBijxF9n I got 2 errors in the console after adding that intent, one for the role but I think it's due to the fact that there is an emoji and I don't know how to integrate it (the emoji is 👤). the other error refers to something I didn't understand and says something like "InvalideType"
thaferra
thaferraOP13mo ago
No description
thaferra
thaferraOP13mo ago
i just censored my full name
thaferra
thaferraOP13mo ago
probably for the "👤"?
No description
thaferra
thaferraOP13mo ago
It's possible to use this feature for roles with emojis, right? the emoji is part of the role name
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
You can use id of role for add member this role
thaferra
thaferraOP13mo ago
how should I go about using the role id?
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
client.on('guildMemberAdd', (member) => {
const WelcomeChannel = client.channels.cache.get(welcomeChannelID);
const roleID = 'role-id'; // Change for your role id
member.roles.add(roleID);
// Your next code
})
client.on('guildMemberAdd', (member) => {
const WelcomeChannel = client.channels.cache.get(welcomeChannelID);
const roleID = 'role-id'; // Change for your role id
member.roles.add(roleID);
// Your next code
})
Thx for correct me
RushPlayz
RushPlayz13mo ago
Use thismember.roles.add(roleID) @/|ĶÎŦÃŖŮ|\
thaferra
thaferraOP13mo ago
i got this from the terminal
No description
thaferra
thaferraOP13mo ago
No description
thaferra
thaferraOP13mo ago
I guess that's why
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
You don't have welcomeChannel set send the part of the code where you set the channel
thaferra
thaferraOP13mo ago
I think I don't have it🫠
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
:__:
thaferra
thaferraOP13mo ago
I knooow, it's just that I'm learning so how can i set the welcomechannel..👀
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
You can also talk through his ID
d.js docs
d.js docs13mo ago
const channel = client.channels.cache.get("222086648706498562");
const channel = guild.channels.cache.find(channel => channel.name === "general");
const channel = client.channels.cache.get("222086648706498562");
const channel = guild.channels.cache.find(channel => channel.name === "general");
- Caches in discord.js are Collections which extend the native Map structure. - learn more
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
How is it going?
thaferra
thaferraOP13mo ago
bad, very bad
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
What problems arise?
thaferra
thaferraOP13mo ago
I think I touched something wrong while I was trying to put the welcome message😅
No description
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
You wont give inent for your client You give GatewayIntentBits.GuildMembers and GatewayIntentBits.Guilds intents for your bot
const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildWebhooks ] });
const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildWebhooks ] });
That my intents for bot
thaferra
thaferraOP13mo ago
ok..now the intent are good, but I still have to set up the welcome channel
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
const welcomeChannel = client.channels.cache.get("222086648706498562"); Change for your id Before welcomeChannel there must be
const welcomeChannel = client.channels.cache.get("Your channel id");
welcomeChannel.messages.fetch //...
const welcomeChannel = client.channels.cache.get("Your channel id");
welcomeChannel.messages.fetch //...
I hope I was able to help you
trustfunds
trustfunds13mo ago
stop spoonfeeding this is not a djs issue atp its a js issue. have proper knowledge of js first there are some useful resources here ->#resources
thaferra
thaferraOP13mo ago
he/she was just giving me a hand because I'm a beginner yessir
/|ĶÎŦÃŖŮ|\
/|ĶÎŦÃŖŮ|\13mo ago
I'm glad I helped, if you have anything, write me, however, I speak Russian, so communication may be difficult.

Did you find this page helpful?