I have a question. How do I check the status of a website?
What do I need? I just want to code the command /status. As soon as a user types this command, the bot should send a embed with the following text: Website-Status: ONLINE/OFFLINE Server-Status: ONLINE/OFFLINE
I need help :D
Using the ping module on npm, you can do this easily.
const { sys } = require('ping'); sys.probe('HOSTNAME / IP', (isAlive) => { if(isAlive) { // Code if true. } else { // Code if false. } });
1.4m articles
1.4m replys
5 comments
57.0k users