mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
Finish preliminary rework, ready to test
This commit is contained in:
parent
293a850075
commit
c99e745f89
177 changed files with 854 additions and 707 deletions
|
@ -12,14 +12,14 @@ export const ClearMutesWithoutRoleCmd = mutesCmd({
|
|||
const muteRole = pluginData.config.get().mute_role;
|
||||
if (!muteRole) return;
|
||||
|
||||
await msg.channel.createMessage("Clearing mutes from members that don't have the mute role...");
|
||||
await msg.channel.send("Clearing mutes from members that don't have the mute role...");
|
||||
|
||||
let cleared = 0;
|
||||
for (const mute of activeMutes) {
|
||||
const member = await resolveMember(pluginData.client, pluginData.guild, mute.user_id);
|
||||
if (!member) continue;
|
||||
|
||||
if (!member.roles.includes(muteRole)) {
|
||||
if (!member.roles.cache.has(muteRole)) {
|
||||
await pluginData.state.mutes.clear(mute.user_id);
|
||||
cleared++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue