Skip to content

Commit 476959c

Browse files
authored
fix: return if timeout is 0 (#968)
1 parent bee85b8 commit 476959c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/v2/commands/repel/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const handleTimeout = async ({
6666
target: User | GuildMember;
6767
duration: number;
6868
}) => {
69-
if (!isUserInServer(target) || isUserTimedOut(target)) return 0;
69+
if (duration === 0 || !isUserInServer(target) || isUserTimedOut(target))
70+
return 0;
7071
const timeoutDuration = duration * 60 * 60 * 1000;
7172
await target.timeout(
7273
timeoutDuration,

0 commit comments

Comments
 (0)