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 toolkit9mo 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
thaferraOP9mo 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
thaferraOP9mo ago
No description
thaferra
thaferraOP9mo ago
i just censored my full name
thaferra
thaferraOP9mo ago
probably for the "👤"?
No description
thaferra
thaferraOP9mo ago
It's possible to use this feature for roles with emojis, right? the emoji is part of the role name
/|ĶÎŦÃŖŮ|\
You can use id of role for add member this role
thaferra
thaferraOP9mo ago
how should I go about using the role id?
/|ĶÎŦÃŖŮ|\
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
RushPlayz9mo ago
Use thismember.roles.add(roleID) @/|ĶÎŦÃŖŮ|\
thaferra
thaferraOP9mo ago
i got this from the terminal
No description
thaferra
thaferraOP9mo ago
No description
thaferra
thaferraOP9mo ago
I guess that's why
/|ĶÎŦÃŖŮ|\
You don't have welcomeChannel set send the part of the code where you set the channel
thaferra
thaferraOP9mo ago
I think I don't have it🫠
/|ĶÎŦÃŖŮ|\
:__:
thaferra
thaferraOP9mo ago
I knooow, it's just that I'm learning so how can i set the welcomechannel..👀
/|ĶÎŦÃŖŮ|\
You can also talk through his ID
d.js docs
d.js docs9mo 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
/|ĶÎŦÃŖŮ|\
How is it going?
thaferra
thaferraOP9mo ago
bad, very bad
/|ĶÎŦÃŖŮ|\
What problems arise?
thaferra
thaferraOP9mo ago
I think I touched something wrong while I was trying to put the welcome message😅
No description
/|ĶÎŦÃŖŮ|\
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
thaferraOP9mo ago
ok..now the intent are good, but I still have to set up the welcome channel
/|ĶÎŦÃŖŮ|\
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
trustfunds9mo 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
thaferraOP9mo ago
he/she was just giving me a hand because I'm a beginner yessir
/|ĶÎŦÃŖŮ|\
I'm glad I helped, if you have anything, write me, however, I speak Russian, so communication may be difficult.
Want results from more Discord servers?
Add your server