Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

fix: invalid link deletes message, so stop checking #813

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Conversation

dan-mba
Copy link
Member

@dan-mba dan-mba commented Jul 1, 2024

Changes proposed

Messages containing an invalid link are deleted
Continuing to check the message is unnecessary

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

@@ -23,6 +23,7 @@ export const onMessage = async (bot: ExtendedClient, message: Message) => {
await adminChannel.send({
embeds: [linkMessage],
});
return; // Return as message is deleted
Copy link
Member

Choose a reason for hiding this comment

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

oh good spot 👍

if (adminChannel && adminChannel.isTextBased()) {
await adminChannel.send({
embeds: [linkMessage],
});
Copy link
Member

Choose a reason for hiding this comment

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

This is great, thank you 👍

Copy link
Member

@eddiejaoude eddiejaoude left a comment

Choose a reason for hiding this comment

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

Super helpful! Thank you Dan 👍

@eddiejaoude eddiejaoude merged commit 450dcf0 into main Jul 2, 2024
4 checks passed
@eddiejaoude eddiejaoude deleted the link-delete branch July 2, 2024 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants