Automatic publish announcements
Hello, I have an announcement channel which I send webhooks to it and I want it to automatically send it to the servers that follows it without me having to click publish, how can I achieve that ?
7 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 OP:event: (event) Client#messageCreate
@14.16.3
Emitted whenever a message is created.
:method: Message#crosspost() @14.16.3
Publishes a message in an announcement channel to all channels following it.
@TÆMBØ so I have to have a bot that is running 24/7 and check messages there ?
Also its an embed message that is being sent there
If you want the publishing to be practically instant with respect to when they're posted, yes
What if the timing is not that important, is there another way around without using a bot ?
You could run some sort of cron job every few hours to fetch messages from that channel and publish each one that hasn't already been published, though that'd still require an app to at least be installed in that guild in order to have access to those messages
Thanks, apprecaite your help