mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-31 23:01:04 +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 = [];
|
global.checkedItems = [];
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
@@ -52,17 +51,15 @@ const comments = new CommentStream(global.client, args);
|
|||||||
const posts = new SubmissionStream(global.client, args);
|
const posts = new SubmissionStream(global.client, args);
|
||||||
|
|
||||||
comments.on('item', async (item) => {
|
comments.on('item', async (item) => {
|
||||||
if (item.created_utc < BOT_START) return;
|
|
||||||
await handleItem(item, false);
|
await handleItem(item, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
posts.on('item', async (item) => {
|
posts.on('item', async (item) => {
|
||||||
//if (item.created_utc < BOT_START) return;
|
|
||||||
await handleItem(item, true);
|
await handleItem(item, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function handleItem(item, isPost) {
|
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 (item.author.name === global.config.reddit.username) return;
|
||||||
|
|
||||||
if (global.checkedItems.includes(item.id)) return;
|
if (global.checkedItems.includes(item.id)) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user