mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 22:21: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 (opts.excluded_roles) {
|
||||||
if (data?.message instanceof SavedMessage) {
|
for (const value of Object.values(data || {})) {
|
||||||
const member = pluginData.guild.members.get(data.message.user_id);
|
if (value instanceof SavedMessage) {
|
||||||
for (const role of member?.roles || []) {
|
const member = pluginData.guild.members.get(data.message.user_id);
|
||||||
if (opts.excluded_roles.includes(role)) {
|
for (const role of member?.roles || []) {
|
||||||
continue logChannelLoop;
|
if (opts.excluded_roles.includes(role)) {
|
||||||
|
continue logChannelLoop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue