Code clean-up
This commit is contained in:
parent
ad800e335c
commit
9713e2c99b
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue