How can i automate message?
So, i am currently using pm2 to automatically run my bot and i want my bot to send message every time pm2 start my bot. If you need any further context, i will explain it. Thank you :woah:
15 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 OPjust send a message in the ready event
which should be run everytime pm2 restarts the process
so i just add send a message here? (sorry, im a beginner)
ye
okay
let me try
now you just have to define the channel object
with this
in the event
okay let me try
what are these numbers suppose to mean? should i change it?
yes, you should change it to the id of the channel you want to send a message to
oh i means i need to change the channel id and channel name?
okay let me try it
you just need to use one of the two ways
not both
either channel id OR channel name
oh okay
is this good?
if the id is correct, then yes
Okay thank you
it worked perfectly π