mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Fix rejoin mutes not working
This commit is contained in:
parent
94870ef85d
commit
59ef2e6fec
3 changed files with 41 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
import { eventListener } from "knub";
|
||||
import { MutesPluginType } from "../types";
|
||||
|
||||
/**
|
||||
* Clear active mute from the member if the member is banned
|
||||
*/
|
||||
export const ClearActiveMuteOnMemberBanEvt = eventListener<MutesPluginType>()(
|
||||
"guildBanAdd",
|
||||
async ({ pluginData, args: { user } }) => {
|
||||
const mute = await pluginData.state.mutes.findExistingMuteForUserId(user.id);
|
||||
if (mute) {
|
||||
pluginData.state.mutes.clear(user.id);
|
||||
}
|
||||
},
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue