refactor(Guild): remove duplicate methods (#7100)

This commit is contained in:
Jan
2021-12-12 22:06:11 +01:00
committed by GitHub
parent ee91f5a19c
commit 717e0e963f
2 changed files with 4 additions and 24 deletions

View File

@@ -68,22 +68,20 @@ class AnonymousGuild extends BaseGuild {
/** /**
* The URL to this guild's banner. * The URL to this guild's banner.
* @param {ImageURLOptions} [options={}] Options for the Image URL * @param {StaticImageURLOptions} [options={}] Options for the Image URL
* @returns {?string} * @returns {?string}
*/ */
bannerURL({ format, size } = {}) { bannerURL({ format, size } = {}) {
if (!this.banner) return null; return this.banner && this.client.rest.cdn.Banner(this.id, this.banner, format, size);
return this.client.rest.cdn.Banner(this.id, this.banner, format, size);
} }
/** /**
* The URL to this guild's invite splash image. * The URL to this guild's invite splash image.
* @param {ImageURLOptions} [options={}] Options for the Image URL * @param {StaticImageURLOptions} [options={}] Options for the Image URL
* @returns {?string} * @returns {?string}
*/ */
splashURL({ format, size } = {}) { splashURL({ format, size } = {}) {
if (!this.splash) return null; return this.splash && this.client.rest.cdn.Splash(this.id, this.splash, format, size);
return this.client.rest.cdn.Splash(this.id, this.splash, format, size);
} }
} }

View File

@@ -479,15 +479,6 @@ class Guild extends AnonymousGuild {
} }
} }
/**
* The URL to this guild's banner.
* @param {StaticImageURLOptions} [options={}] Options for the Image URL
* @returns {?string}
*/
bannerURL({ format, size } = {}) {
return this.banner && this.client.rest.cdn.Banner(this.id, this.banner, format, size);
}
/** /**
* The time the client user joined the guild * The time the client user joined the guild
* @type {Date} * @type {Date}
@@ -497,15 +488,6 @@ class Guild extends AnonymousGuild {
return new Date(this.joinedTimestamp); return new Date(this.joinedTimestamp);
} }
/**
* The URL to this guild's invite splash image.
* @param {StaticImageURLOptions} [options={}] Options for the Image URL
* @returns {?string}
*/
splashURL({ format, size } = {}) {
return this.splash && this.client.rest.cdn.Splash(this.id, this.splash, format, size);
}
/** /**
* The URL to this guild's discovery splash image. * The URL to this guild's discovery splash image.
* @param {StaticImageURLOptions} [options={}] Options for the Image URL * @param {StaticImageURLOptions} [options={}] Options for the Image URL