This API sends a Tweet of the time every hour. You can mod it so it can send it as frequent as you want as well as make this on another bot such as discord.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
var today = new Date();
var Minutes = 0;
var Seconds = 0;
if (today.getMinutes() < 10) {
Minutes = String(0) + String(today.getMinutes());
} else {
Minutes = today.getMinutes();
}
if (today.getSeconds() < 10) {
Seconds = String(0) + String(today.getSeconds());
} else {
Seconds = today.getSeconds();
}
await lib.twitter.tweets['@1.1.1'].statuses.create({
status:
`Hello. Today is ` +
today.getFullYear() +
`-` +
(today.getMonth() + 1) +
`-` +
today.getDate() +
` at ` +
today.getHours() +
`:` +
Minutes +
`:` +
Seconds +
` GMT. #Time #Clock`,
});
console.log('Sent Tweet');