Created
May 1, 2021 05:52
-
-
Save kidsonfilms-python-rules/3949a005b0ab75af521c78e6e84c3917 to your computer and use it in GitHub Desktop.
Send Discord Message at certain time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var robot = require("robotjs"); | |
// Put the message you want to send | |
const message = '' | |
// Set Date as (Year, Month 0-11, Day, Hour, Minute) | |
const eta_ms = new Date(2021, 3, 30, 22, 41).getTime() - Date.now(); | |
console.log(`Sending Message in ${eta_ms}ms or ${new Date(Date.now() + eta_ms)}`) | |
var timeout = setTimeout(function(){ | |
console.log('Sending Message') | |
robot.typeString(message); | |
robot.keyTap('enter') | |
console.log('Message Sent!') | |
}, eta_ms); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment