diff --git a/src/class/RichEmbed.ts b/src/class/RichEmbed.ts index 691f572..7df2ec0 100644 --- a/src/class/RichEmbed.ts +++ b/src/class/RichEmbed.ts @@ -1,20 +1,8 @@ /* eslint-disable no-param-reassign */ -export interface EmbedData { - title?: string - description?: string - url?: string - timestamp?: Date - color?: number - footer?: { text: string, icon_url?: string, proxy_icon_url?: string} - image?: { url: string, proxy_url?: string, height?: number, width?: number } - thumbnail?: { url: string, proxy_url?: string, height?: number, width?: number } - video?: { url: string, height?: number, width?: number } - author?: { name: string, url?: string, proxy_icon_url?: string, icon_url?: string} - fields?: {name: string, value: string, inline?: boolean}[] -} +import { EmbedOptions } from 'eris'; -export default class RichEmbed implements EmbedData { +export default class RichEmbed implements EmbedOptions { title?: string type?: string @@ -23,15 +11,15 @@ export default class RichEmbed implements EmbedData { url?: string - timestamp?: Date + timestamp?: string | Date color?: number footer?: { text: string, icon_url?: string, proxy_icon_url?: string} - image?: { url: string, proxy_url?: string, height?: number, width?: number } + image?: { url?: string, proxy_url?: string, height?: number, width?: number } - thumbnail?: { url: string, proxy_url?: string, height?: number, width?: number } + thumbnail?: { url?: string, proxy_url?: string, height?: number, width?: number } video?: { url: string, height?: number, width?: number } @@ -41,7 +29,7 @@ export default class RichEmbed implements EmbedData { fields?: {name: string, value: string, inline?: boolean}[] - constructor(data: EmbedData = {}) { + constructor(data: EmbedOptions = {}) { /* let types: { title?: string, type?: string, description?: string, url?: string, timestamp?: Date, color?: number, fields?: {name: string, value: string, inline?: boolean}[]