mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
14 lines
403 B
TypeScript
14 lines
403 B
TypeScript
import { mutesEvt } from "../types";
|
|
|
|
/**
|
|
* Clear active mute from the member if the member is banned
|
|
*/
|
|
export const ClearActiveMuteOnMemberBanEvt = mutesEvt({
|
|
event: "guildBanAdd",
|
|
async listener({ pluginData, args: { ban } }) {
|
|
const mute = await pluginData.state.mutes.findExistingMuteForUserId(ban.user.id);
|
|
if (mute) {
|
|
pluginData.state.mutes.clear(ban.user.id);
|
|
}
|
|
},
|
|
});
|