Skip to content

Commit 93bd396

Browse files
committed
Merge branch 'main' of https://github.com/Ategon/Lemmy-Mega-Bot into main
2 parents 74ad0f5 + 2acf60f commit 93bd396

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ A lemmy bot that watches rss feeds and posts new posts from them in communities
33

44
This bot is made for the https://programming.dev/ communities but the source code can be modified to accomodate any community
55

6+
## Prerequisites
7+
- You need to have installed node.js in order to run the bot
8+
69
## Notes
710
- If running on windows the environment variables may act up. You can insert them manually into the bot by replacing the things like process.env.USERNAME and the other things starting with process.env with the value for username in .env or their other respective value
8-
- The lemmy bot api has not been updated for v0.18 so this bot will not work on v0.18 instances until thats done. Ill get it functioning as soon as its available
911

1012

1113
## Setup
@@ -17,20 +19,9 @@ INSTANCE="" // The instance the bot account is in
1719
USERNAME="" // The bot username
1820
PASSWORD="" // The bot password
1921
```
20-
4. Change the data for the communities and feeds variables based on what you want set.
21-
5. **IMPORTANT:** If you do not want to bot to back post any other posts it finds in the rss feeds, the first time you start up the bot you have to comment out the lines where it calls createPost. When you start up the bot it will insert them all into the database so it doesnt post again but as the create post is commented out it doesnt make a post. You should see a bunch of things appearing in the logs about adding new links (and it may take up to 10 minutes for the cycle to get to a time where it wants to post to start doing that). Then when its done uncomment then start the bot up again and it should behave normally.
22-
23-
The lines to comment out should look like this and to comment out just use /* to start the comment and */ to end it
24-
```
25-
await createPost({
26-
name: item.title,
27-
body: ((feed.content && feed.content === 'summary') ? item.summary : item.content),
28-
url: item.link || undefined,
29-
community_id: communityId,
30-
});
31-
```
32-
7. Open a terminal in the bot folder and run `npm install` to install dependendies and then `node main.js` to run the bot (whenever you want to start the bot again you can just do ctrl+c to interrupt the process and node main.js to start the bot)
22+
4. Change the data in config.yaml based on what you want set. Set the communities and feeds you want here
23+
5. Open a terminal in the bot folder and run `npm install` to install dependendies and then `node main.js` to run the bot (whenever you want to start the bot again you can just do ctrl+c to interrupt the process and node main.js to start the bot)
3324

34-
I recommend installing something like [forever.js](https://www.npmjs.com/package/forever) for making it run continually
25+
I recommend installing something like [forever.js](https://www.npmjs.com/package/forever) which will make it start back up again if it errors at some point
3526

3627
If you run into issues feel free to dm me on Matrix [here](https://matrix.to/#/@ategon:matrix.org)

0 commit comments

Comments
 (0)