1
Fork 0
mirror of https://github.com/RGBCube/TwitterDiscordWebhook synced 2025-07-27 04:57:44 +00:00

Goofy ahh js

This commit is contained in:
RGBCube 2023-01-15 20:45:02 +03:00 committed by GitHub
parent 93ec35885b
commit 412ab9e10b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
main.js
View file

@ -26,9 +26,9 @@ let stream = tClient.stream("statuses/filter", { follow: config.user_id });
console.log(`Fetching tweets from id '${config.user_id}'.`);
stream.on("connected", _ => {
console.log("Successfully connected to Twitter!");
});
stream.on("connected", () =>
console.log("Successfully connected to Twitter!");
);
stream.on("tweet", twt => {
if(twt.retweeted_status || twt.in_reply_to_status_id || twt.is_quote_status) return;
@ -37,14 +37,14 @@ stream.on("tweet", twt => {
wClient.send(`${config.webhook_message} ${twitterLink}`);
});
stream.on("disconnect", _ => {
console.log("Disconnected from twitter!");
});
stream.on("disconnect", () =>
console.log("Disconnected from twitter!");
);
stream.on("reconnect", function (_, _, _) => {
stream.on("reconnect", () =>
console.log("Reconnecting to Twitter!");
});
);
process.on("uncaughtException", err => {
process.on("uncaughtException", err =>
console.log(`Something (bad) happened: ${err}`);
});
);