diff --git a/src/backend/chatClient/clientActions/timeout/index.ts b/src/backend/chatClient/clientActions/timeout/index.ts index 3d145bc..da76ea4 100644 --- a/src/backend/chatClient/clientActions/timeout/index.ts +++ b/src/backend/chatClient/clientActions/timeout/index.ts @@ -15,11 +15,7 @@ async function timeout( reason = ""; } - try { - await chatClient.timeout(channel, username, time, reason); - } catch (e) { - // user cannot be timed out - } + await chatClient.timeout(channel, username, time, reason); } export { timeout }; diff --git a/src/backend/chatClient/index.ts b/src/backend/chatClient/index.ts index f3e016f..ecfd68f 100644 --- a/src/backend/chatClient/index.ts +++ b/src/backend/chatClient/index.ts @@ -57,7 +57,11 @@ async function handleClientAction(action: Action): Promise { say(channel, action.data.message); break; case ActionType.Timeout: - await timeout(channel, username, action.data.time, action.data.reason); + try { + await timeout(channel, username, action.data.time, action.data.reason); + } catch (e) { + // user cannot be timed out + } break; case ActionType.Broadcast: broadcast(action.data.message);