feat(settings): add option to ignore self edits to MessageLogger (#932)
Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
8ad745d5cb
commit
de34a074c9
1 changed files with 12 additions and 0 deletions
|
|
@ -363,6 +363,11 @@ const settings = definePluginSettings({
|
|||
description: "Whether to ignore messages by yourself",
|
||||
default: false,
|
||||
},
|
||||
ignoreSelfEdits: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Whether to ignore edits by yourself",
|
||||
default: false,
|
||||
},
|
||||
ignoreUsers: {
|
||||
type: OptionType.STRING,
|
||||
description: "Comma-separated list of user IDs to ignore",
|
||||
|
|
@ -402,6 +407,11 @@ const settings = definePluginSettings({
|
|||
return !this.store.showEditDiffs;
|
||||
},
|
||||
},
|
||||
ignoreSelfEdits: {
|
||||
disabled() {
|
||||
return this.store.ignoreSelf;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
|
|
@ -585,6 +595,7 @@ export default definePlugin({
|
|||
const {
|
||||
ignoreBots,
|
||||
ignoreSelf,
|
||||
ignoreSelfEdits,
|
||||
ignoreUsers,
|
||||
ignoreChannels,
|
||||
ignoreGuilds,
|
||||
|
|
@ -596,6 +607,7 @@ export default definePlugin({
|
|||
return (
|
||||
(ignoreBots && message.author?.bot) ||
|
||||
(ignoreSelf && message.author?.id === myId) ||
|
||||
(ignoreSelfEdits && isEdit && message.author?.id === myId) ||
|
||||
ignoreUsers.includes(message.author?.id) ||
|
||||
ignoreChannels.includes(message.channel_id) ||
|
||||
ignoreChannels.includes(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue