mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
logs: fix excluded_roles for messages (vol 2)
This commit is contained in:
parent
a72750b8d8
commit
a1d188cc79
1 changed files with 7 additions and 5 deletions
|
@ -43,11 +43,13 @@ export async function log(pluginData: GuildPluginData<LogsPluginType>, type: Log
|
|||
}
|
||||
|
||||
if (opts.excluded_roles) {
|
||||
if (data?.message instanceof SavedMessage) {
|
||||
const member = pluginData.guild.members.get(data.message.user_id);
|
||||
for (const role of member?.roles || []) {
|
||||
if (opts.excluded_roles.includes(role)) {
|
||||
continue logChannelLoop;
|
||||
for (const value of Object.values(data || {})) {
|
||||
if (value instanceof SavedMessage) {
|
||||
const member = pluginData.guild.members.get(data.message.user_id);
|
||||
for (const role of member?.roles || []) {
|
||||
if (opts.excluded_roles.includes(role)) {
|
||||
continue logChannelLoop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue