default function parameter
This commit is contained in:
parent
9c42916cd2
commit
cdd874275e
1 changed files with 1 additions and 2 deletions
|
@ -40,10 +40,9 @@ export class User extends Base {
|
||||||
return `<@${this.id}>`
|
return `<@${this.id}>`
|
||||||
}
|
}
|
||||||
|
|
||||||
avatarURL(format?: ImageFormats, size?: ImageSize, dynamic?: boolean) {
|
avatarURL(format?: ImageFormats, size?: ImageSize, dynamic: boolean = true) {
|
||||||
if (!format) format = 'webp'
|
if (!format) format = 'webp'
|
||||||
if (!size) size = 512
|
if (!size) size = 512
|
||||||
if (dynamic === undefined) dynamic = true
|
|
||||||
|
|
||||||
return this.avatar
|
return this.avatar
|
||||||
? `${ImageURL(USER_AVATAR(this.id, dynamic ? this.avatar : this.avatar.replace('a_', '')), format, size)}`
|
? `${ImageURL(USER_AVATAR(this.id, dynamic ? this.avatar : this.avatar.replace('a_', '')), format, size)}`
|
||||||
|
|
Loading…
Reference in a new issue