Skip to content

Possible fix for buttons#439

Open
3061LRTAGSPKJMORMRT wants to merge 3 commits into
mainfrom
button-fix
Open

Possible fix for buttons#439
3061LRTAGSPKJMORMRT wants to merge 3 commits into
mainfrom
button-fix

Conversation

@3061LRTAGSPKJMORMRT
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread server.js
}
}, 2000)

setInterval(async () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't leave junk code comments

Comment thread server.js

const eventFiles = fs.readdirSync("./events").filter((file) => file.endsWith(".js"))
const eventFiles = fs.readdirSync(`${__dirname}/events`).filter((file) => file.endsWith(".js"))
for (const file of eventFiles) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foreach

Comment thread events/button.js
let stat = await stats.find()
stat = stat[0]
let gam = stat.games.find((game) => Object.keys(game) == db.get("game.id"))
let gam = stat?.games.find((game) => Object.keys(game) == db.get("game.id"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if games property itself is null/undefined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants