Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plugin] BlockKeywords #2238

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

[Plugin] BlockKeywords #2238

wants to merge 26 commits into from

Conversation

CatCraftYT
Copy link

Blocks messages containing certain keywords (defined by the user) as if they were sent by a blocked user.

@Terraman2
Copy link

Please make it support regular expressions as was mentioned in this issue: Vencord/plugin-requests#159, I need it. Also please make it so it can also replace words in other people's messages from your perspective. & it would be nice if you make it so if the description message of a forum post or thread is hidden, the forum post or thread itself is also hidden.

type: OptionType.STRING,
description: "Comma-seperated list of words to block",
default: "",
restartNeeded: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Is a restart actually needed for all of these settings? If not, an onChange function that updates blockedKeywords could instead be added to these setting definitions. Maybe the code in start() could be moved to a top-level function that is used as the value of start and the onChanges.

Copy link
Author

Choose a reason for hiding this comment

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

I made a new branch on my repo with changes that almost implement this, but it only actually visibly blocks the messages when the user switches channels. The messages in the currently viewed channel aren't updated when the message list is updated for some reason. The block feature gets around this but I'm not sure how rn

@CatCraftYT
Copy link
Author

Please make it support regular expressions as was mentioned in this issue: Vencord/plugin-requests#159, I need it. Also please make it so it can also replace words in other people's messages from your perspective. & it would be nice if you make it so if the description message of a forum post or thread is hidden, the forum post or thread itself is also hidden.

It does support regular expressions, it's in the settings :)

@Terraman2
Copy link

Terraman2 commented May 2, 2024

I think there really should be a feature where you can publish filter lists, & there should also be a feature where anyone can make a fork of a list, & the fork can be merged into the original. Maybe it should also be possible to make a filter list that combines multiple pre-existing filter lists. & anyone should be able to use any version of a filter list & choose whether or not to automatically update it. If they use the newest version, automatic updates would be enabled by default, but if they use any other version, automatic updates would be disabled by default. That way anyone can use big complex filter lists & no individual person has to make all of the filters for the most popular lists.

@j4k0xb
Copy link

j4k0xb commented May 7, 2024

Can you add multiple regex inputs or at least one per line in a textarea instead of splitting on ,?
Currently its impossible to use e.g. \w{1,10}

Here's my attempt:
image
It will merge them into a single regex (and escape the strings): /steamcommunity\.com.+?\]\(https|test/i

@CatCraftYT
Copy link
Author

CatCraftYT commented May 24, 2024

Can you add multiple regex inputs or at least one per line in a textarea instead of splitting on ,? Currently its impossible to use e.g. \w{1,10}

Here's my attempt:
It will merge them into a single regex (and escape the strings): /steamcommunity\.com.+?\]\(https|test/i

Awesome, where can I find the source for this?

@j4k0xb
Copy link

j4k0xb commented May 24, 2024

https://github.com/j4k0xb/Vencord/tree/block-keywords/src/plugins/blockKeywords
edit: deleted fork, waste of time trying to contribute

@Messured
Copy link

I can't install this could someone tell me how real quick?

@Feathers8
Copy link

https://github.com/j4k0xb/Vencord/tree/block-keywords/src/plugins/blockKeywords
edit: deleted fork, waste of time trying to contribute

Huh? Why though? Can you elaborate please? @j4k0xb

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.

7 participants