mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(reddit-bot): dont check for item creation date
This commit is contained in:
@@ -38,7 +38,6 @@ for (const file of commandFiles) {
|
||||
}
|
||||
}
|
||||
|
||||
const BOT_START = Date.now() / 1000;
|
||||
global.checkedItems = [];
|
||||
|
||||
const args = {
|
||||
@@ -52,17 +51,15 @@ const comments = new CommentStream(global.client, args);
|
||||
const posts = new SubmissionStream(global.client, args);
|
||||
|
||||
comments.on('item', async (item) => {
|
||||
if (item.created_utc < BOT_START) return;
|
||||
await handleItem(item, false);
|
||||
});
|
||||
|
||||
posts.on('item', async (item) => {
|
||||
//if (item.created_utc < BOT_START) return;
|
||||
await handleItem(item, true);
|
||||
});
|
||||
|
||||
async function handleItem(item, isPost) {
|
||||
// The "skill issue (refresh) incident."
|
||||
// The "skill issue (refresh)" incident.
|
||||
if (item.author.name === global.config.reddit.username) return;
|
||||
|
||||
if (global.checkedItems.includes(item.id)) return;
|
||||
|
||||
Reference in New Issue
Block a user