Skip to content

Commit a3f7fc2

Browse files
committed
Fix windows not reading env properly
1 parent 89c5996 commit a3f7fc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ for (const [instance, communities] of Object.entries(instances)) {
101101

102102
// Log in
103103
const bot = new LemmyBot.LemmyBot({
104-
instance: process.env.INSTANCE,
104+
instance: process.env.LEMMY_INSTANCE,
105105
credentials: {
106-
username: process.env.USERNAME,
107-
password: process.env.PASSWORD,
106+
username: process.env.LEMMY_USERNAME,
107+
password: process.env.LEMMY_PASSWORD,
108108
},
109109
dbFile: 'db.sqlite3',
110110
federation: {
@@ -120,7 +120,7 @@ const bot = new LemmyBot.LemmyBot({
120120
botActions: { featurePost },
121121
}) => {
122122
// Pin post if its by the bot and set to be pinned
123-
if (creator.name == process.env.USERNAME) {
123+
if (creator.name == process.env.LEMMY_USERNAME) {
124124
// get link from db. If pin days > 0 then pin
125125
db.all(`SELECT * FROM posts WHERE link = ?`, [post.url], async (err, rows) => {
126126
if (err) {

0 commit comments

Comments
 (0)