19 Replies
The error comes in this line:
await the guild.channels.create
and even better, set logchannel to the resolved promise since it returns the channel
Also another thing, my bot has admin perms, but doesn't use emojis from other servers.
Why is that so?
So it created the channel n stuff. But then this comes as invalid:
channel is undefined
The bot is in 2 servers, the emoji is in 1 of the servers.
did you resolve the promise?
How?
Also the everyone role needs use external emoji permission for the bot to use external emojis if you use interactions
Like i get this in the title
I would recommend learning up on promises if you haven't yet
Resources to understand Promise:
• MDN: learn more
• Guide: learn more
• JavaScript info: learn more
The general format for emojis is <:name:id> actually
I know, in the code it looks like this
<:META_SHIELD_MODERATOR:987691307126362113>
then check the permissions thing
Bot has admin
for @everyone role
That worked.
đź‘Ť
Learn up on promises and you would also be able to resolve that promise and move forward
But why is this undefined. There is a channel names like that.
Yes but you didn't resolve the promise so the channel has technically not yet been made
Is the resolving required?
Like this?
What am i missing?
Im looking at the djs guide atm, i don't really see anything there about it.
But doesn't guild.create already return a promise?
Something like this?
So i remove await ig
I don't get what you mean xd
Ye, but what do i put inside the console.log, or how do i get the result
So the channel id will be channelCreating.id
I have this:
let channel = channelCreating.id
and in embed i have <#${channel}>
but it comes as undefined.
https://srcb.in/9xAsQYqH0e
First one is category
https://sourceb.in/nhlglf5GTk
Made the changes
Oh wait, accident
Oh alright it worked.
Thank you very much.
I'll prolly come back some time coz i might still run into some issues.
Yeah, so when i wanna create a role, i also do the promise right?
Just tested it, it retures the roleCreating as undefined.
https://sourceb.in/al3MYYbcPJ
Oh wait, it was my dum dum in the embed thingy. But it doesn't edit the role, meaning it creates the role but doesn't name it and doesn't give color
I think it's something with data: etc..
Really?
Just name?
Yeah that worked