mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-25 16:56:23 +00:00
add ignore bots
This commit is contained in:
parent
42b09a3d0b
commit
c7ed529a6c
1 changed files with 10 additions and 1 deletions
|
@ -74,7 +74,13 @@ function highlightKeywords(s: string, r: Array<string>) {
|
|||
}
|
||||
|
||||
const settings = definePluginSettings({
|
||||
replace: {
|
||||
ignoreBots: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Ignore messages from bots",
|
||||
default: true
|
||||
},
|
||||
|
||||
keywords: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "",
|
||||
component: () => {
|
||||
|
@ -172,6 +178,9 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
applyRegexes(m) {
|
||||
if (settings.store.ignoreBots && m.author.bot)
|
||||
return;
|
||||
|
||||
if (regexes.some(r => r != "" && safeMatchesRegex(m.content, r))) {
|
||||
m.mentions.push(this.me);
|
||||
|
||||
|
|
Loading…
Reference in a new issue