💥 Remove try/catch from timeout
Call to this method should now be surrounded by try catch
This commit is contained in:
@@ -15,11 +15,7 @@ async function timeout(
|
||||
reason = "";
|
||||
}
|
||||
|
||||
try {
|
||||
await chatClient.timeout(channel, username, time, reason);
|
||||
} catch (e) {
|
||||
// user cannot be timed out
|
||||
}
|
||||
}
|
||||
|
||||
export { timeout };
|
||||
|
@@ -57,7 +57,11 @@ async function handleClientAction(action: Action): Promise<void> {
|
||||
say(channel, action.data.message);
|
||||
break;
|
||||
case ActionType.Timeout:
|
||||
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);
|
||||
|
Reference in New Issue
Block a user