My fork lets the bot keep trying for connection if no connection is immediately made (my RPi took a little longer to startup while pm2 already started this node). Also fixed some substitution bugs where it wouldn't run. Not all functions are working correct, but wake does work nicely.
The rest of tarun5060s readme:
This is a simple Discord bot that can be used to wake up a computer using Wake-On-LAN (WOL). It also includes some additional commands such as ping and uptime, and the ability to evaluate and execute arbitrary code. Big thanks to m4 for helping me with the JS part.
- Clone the repository:
git clone https://github.com/tarun5060/WakeOnLAN-Bot
- Install dependencies:
npm install
- Update the
config.json
file with the following fields:ownerID
: The Discord user ID of the bot ownertoken
: Your Discord bot tokenipAddress
: The IP address of the computer you want to wake upmacAddress
: The MAC address of the network interface on the computer you want to wake up
- Run the bot:
node index.js
Once the bot is running, you can use the following commands:
wake
: Sends a WOL magic packet to wake up the computer*ping
: Displays the bot's latency and the API latencyuptime
: Displays the bot's uptime in hourseval
: Evaluates JavaScript code*exec
: Executes a shell command*status
: Pings the computer and displays the result*
*owner only
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE
file for more information.
If you encounter a bug or an issue, feel free to reach me
- Discord:
Tarun#0001
- Twitter:
@_tarun0
If you wish to support me and this project, you can do so here. Appreciate it :)