From 109da49a12ec3419469914dc44a60ea5385c3a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sun, 24 Jan 2021 13:52:52 +0900 Subject: [PATCH] fix: bug for default image --- utils/Constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/Constants.ts b/utils/Constants.ts index 019c934..d0b849e 100644 --- a/utils/Constants.ts +++ b/utils/Constants.ts @@ -99,7 +99,7 @@ export const DiscordEnpoints = { static root = BASE_URLs.cdn static emoji (id: string, options:ImageOptions={}) { return makeImageURL(`${this.root}/emojis/${id}`, options) } static guild (id: string, hash: string, options:ImageOptions={}) { return makeImageURL(`${this.root}/icons/${id}/${hash}`, options) } - static default (tag: string, options:ImageOptions={}) { return makeImageURL(`${this.root}/embed/avatars/${isNaN(Number(tag)) ? Number(tag) % 5 : 0}`, options) } + static default (tag: string|number, options:ImageOptions={}) { return makeImageURL(`${this.root}/embed/avatars/${!isNaN(Number(tag)) ? Number(tag) % 5 : 0}`, options) } static user (id: string, hash: string, options:ImageOptions={}) { return makeImageURL(`${this.root}/avatars/${id}/${hash}`, options) } } }