Skip to content

Commit

Permalink
Another attempt at debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsunami014 committed Dec 6, 2023
1 parent bee6607 commit 4d1d909
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/notifyDiscord.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ client.once(Events.ClientReady, async (readyClient) => {

// Iterate through the fetched messages
for (const [, message] of messages) {
console.log(message.content)
if (message.content.includes('@')) {
// Check if the message contains an '@' mention
const githubActor = process.env.GITHUB_ACTOR;
console.log(`GitHub actor: ${githubActor}`);
const newMsg = processMessage(message.content, githubActor);
console.log(`Message: ${newMsg}`);
channel.send(newMsg)
.then(() => {
console.log(`Sent message: ${newMsg}`);
Expand All @@ -44,7 +44,6 @@ client.once(Events.ClientReady, async (readyClient) => {
console.error(`Error sending message: ${error}`);
process.exit(); // Exit the process after sending the message
});
break; // Exit the loop once a message with an '@' mention is found
}
}

Expand Down

0 comments on commit 4d1d909

Please sign in to comment.