3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +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 { import {
Client, Client,
Constants, Constants,
DiscordAPIError,
Emoji, Emoji,
Guild, Guild,
GuildAuditLogs, GuildAuditLogs,
@ -84,8 +85,8 @@ export function isDiscordHTTPError(err: Error | string) {
return typeof err === "object" && err.constructor?.name === DISCORD_HTTP_ERROR_NAME; return typeof err === "object" && err.constructor?.name === DISCORD_HTTP_ERROR_NAME;
} }
export function isDiscordAPIError(err: Error | string) { export function isDiscordAPIError(err: Error | string): err is DiscordAPIError {
return typeof err === "object" && err.constructor?.name === DISCORD_REST_ERROR_NAME; return err instanceof DiscordAPIError;
} }
export function tNullable<T extends t.Type<any, any>>(type: T) { export function tNullable<T extends t.Type<any, any>>(type: T) {