Updating Channel Name
Hi im trying to update the channel name every 10 minutes for the server status. But if he is trying to set the name he crashes..
CODE:
ERROR:
/home/container/src/events/mcstatus.js:24
client.channels.cache.get("1089550987527717027").setName(
🟢 | play.PulseTopia.nl
);
^
TypeError: Cannot read properties of undefined (reading 'setName')
at Timeout._onTimeout (/home/container/src/events/mcstatus.js:24:53)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
```2 Replies
- 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 staffthe channel id is incorrect, or it is not cached
meaning you do not have the Guilds intent
nvm actually