Skip to content

Commit

Permalink
fix: duplicate handling wherever of the line position (#41)
Browse files Browse the repository at this point in the history
* fix: duplicate handling wherever of the line position

* fix: correct env for DISCORD_TOKEN
  • Loading branch information
0xtekgrinder authored Jul 11, 2024
1 parent 262f7fd commit 34c344e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions utils/checkRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1172,10 +1172,11 @@ client.on("ready", async () => {
for (const embed of embeds) {
if (
latestChainIdsMessages.find(
(m) =>
m.data.description.replace(/\n/g, "") ==
embed.data.description.replace(/\n/g, "")
)
(m) => {
const description = m.data.description.split("\n");
const embedDescription = embed.data.description.split("\n");
return description.every((line) => embedDescription.includes(line));
})
) {
console.log("chain embed is already the same");
continue;
Expand Down

0 comments on commit 34c344e

Please sign in to comment.