mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 17:26:22 +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({
|
const settings = definePluginSettings({
|
||||||
replace: {
|
ignoreBots: {
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
description: "Ignore messages from bots",
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
|
||||||
|
keywords: {
|
||||||
type: OptionType.COMPONENT,
|
type: OptionType.COMPONENT,
|
||||||
description: "",
|
description: "",
|
||||||
component: () => {
|
component: () => {
|
||||||
|
@ -172,6 +178,9 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
applyRegexes(m) {
|
applyRegexes(m) {
|
||||||
|
if (settings.store.ignoreBots && m.author.bot)
|
||||||
|
return;
|
||||||
|
|
||||||
if (regexes.some(r => r != "" && safeMatchesRegex(m.content, r))) {
|
if (regexes.some(r => r != "" && safeMatchesRegex(m.content, r))) {
|
||||||
m.mentions.push(this.me);
|
m.mentions.push(this.me);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue