1
0
Fork 0

fix richembed shit again

refactor/models
Matthew 2019-10-27 22:11:57 -04:00
parent ec5717d0a7
commit bfde851211
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 0 additions and 1 deletions

View File

@ -170,7 +170,6 @@ export default class RichEmbed {
setFooter(text: string, icon_url?: string) { setFooter(text: string, icon_url?: string) {
if (typeof text !== 'string') throw new TypeError('RichEmbed Footers must be a string.'); if (typeof text !== 'string') throw new TypeError('RichEmbed Footers must be a string.');
if (icon_url && typeof icon_url !== 'string') throw new TypeError('RichEmbed Footer icon URLs must be a string.'); if (icon_url && typeof icon_url !== 'string') throw new TypeError('RichEmbed Footer icon URLs must be a string.');
if (!icon_url.startsWith('http://') || !icon_url.startsWith('https://')) icon_url = `https://${icon_url}`;
if (text.length > 2048) throw new RangeError('RichEmbed footer text may not exceed 2048 characters.'); if (text.length > 2048) throw new RangeError('RichEmbed footer text may not exceed 2048 characters.');
this.footer = { text, icon_url }; this.footer = { text, icon_url };
return this; return this;