Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 196b12d

Browse files
committedJun 28, 2024·
Replace require to use reading file with fs
1 parent 17b7d63 commit 196b12d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎events/lunch_buddy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder } = require("discord.js");
22
const cron = require("node-cron");
3-
const lunchBuddyLocations = require("../data/lunch_buddy_locations.json");
4-
const config = require("../config/lunch_buddy.json");
3+
const fs = require("fs");
4+
5+
const lunchBuddyLocations = JSON.parse(fs.readFileSync("./data/lunch_buddy_locations.json"));
6+
const config = JSON.parse(fs.readFileSync("./config/lunch_buddy.json"));
57

68
const maxRowButtons = 4;
79
const areaButtonCustomId = "AreaButton";

0 commit comments

Comments
 (0)
Please sign in to comment.