Use eris interface
parent
fb37fb9e71
commit
9bc1576fc7
|
@ -1,20 +1,8 @@
|
||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
|
|
||||||
export interface EmbedData {
|
import { EmbedOptions } from 'eris';
|
||||||
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}[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class RichEmbed implements EmbedData {
|
export default class RichEmbed implements EmbedOptions {
|
||||||
title?: string
|
title?: string
|
||||||
|
|
||||||
type?: string
|
type?: string
|
||||||
|
@ -23,15 +11,15 @@ export default class RichEmbed implements EmbedData {
|
||||||
|
|
||||||
url?: string
|
url?: string
|
||||||
|
|
||||||
timestamp?: Date
|
timestamp?: string | Date
|
||||||
|
|
||||||
color?: number
|
color?: number
|
||||||
|
|
||||||
footer?: { text: string, icon_url?: string, proxy_icon_url?: string}
|
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 }
|
video?: { url: string, height?: number, width?: number }
|
||||||
|
|
||||||
|
@ -41,7 +29,7 @@ export default class RichEmbed implements EmbedData {
|
||||||
|
|
||||||
fields?: {name: string, value: string, inline?: boolean}[]
|
fields?: {name: string, value: string, inline?: boolean}[]
|
||||||
|
|
||||||
constructor(data: EmbedData = {}) {
|
constructor(data: EmbedOptions = {}) {
|
||||||
/*
|
/*
|
||||||
let types: {
|
let types: {
|
||||||
title?: string, type?: string, description?: string, url?: string, timestamp?: Date, color?: number, fields?: {name: string, value: string, inline?: boolean}[]
|
title?: string, type?: string, description?: string, url?: string, timestamp?: Date, color?: number, fields?: {name: string, value: string, inline?: boolean}[]
|
||||||
|
|
Loading…
Reference in New Issue