Skip to content

Commit

Permalink
conditional chaining in wordle
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMonDon committed Oct 20, 2023
1 parent a4793fd commit 9b4de42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/Games/wordle.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class Wordle extends Command {
const word = collected?.first()?.content.toLowerCase();
if (!word) gameOver = true;
collected
.first()
.delete()
?.first()
?.delete()
.catch(() => {});

if (!allWords.includes(word)) {
Expand Down

0 comments on commit 9b4de42

Please sign in to comment.