I have code that is constantly running in the background in JavaScript, 24/7. I am looking to configure a discord.js bot to send a notification message if any issues or errors occur within the code.
Is there a way to send a message to any channel without needing to listen for a specific command trigger? Most tutorials show how to create commands that require the user to initiate interaction with the bot first. However, I want the bot to proactively send a message and then take action based on the user's response.
Currently, I am utilizing the discord.js node library available at https://discord.js.org/.
Can this functionality be achieved?