3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00

feat: timeout support

This commit is contained in:
Dragory 2023-04-01 18:33:09 +03:00 committed by Miikka
parent 06877e90cc
commit 39e0dfa27f
23 changed files with 532 additions and 92 deletions

View file

@ -44,7 +44,11 @@ export const UnmuteCmd = modActionsCmd({
const hasMuteRole = memberToUnmute && mutesPlugin.hasMutedRole(memberToUnmute);
// Check if they're muted in the first place
if (!(await pluginData.state.mutes.isMuted(args.user)) && !hasMuteRole) {
if (
!(await pluginData.state.mutes.isMuted(user.id)) &&
!hasMuteRole &&
!memberToUnmute?.communicationDisabledUntilTimestamp
) {
sendErrorMessage(pluginData, msg.channel, "Cannot unmute: member is not muted");
return;
}