3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Code clean-up

This commit is contained in:
Dragory 2021-08-18 23:03:19 +03:00
parent ad800e335c
commit 9713e2c99b
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,6 +1,7 @@
import {
Client,
Constants,
DiscordAPIError,
Emoji,
Guild,
GuildAuditLogs,
@ -84,8 +85,8 @@ export function isDiscordHTTPError(err: Error | string) {
return typeof err === "object" && err.constructor?.name === DISCORD_HTTP_ERROR_NAME;
}
export function isDiscordAPIError(err: Error | string) {
return typeof err === "object" && err.constructor?.name === DISCORD_REST_ERROR_NAME;
export function isDiscordAPIError(err: Error | string): err is DiscordAPIError {
return err instanceof DiscordAPIError;
}
export function tNullable<T extends t.Type<any, any>>(type: T) {