Use eris interface

merge-requests/12/head
Bsian 2020-05-17 00:36:36 +01:00
parent fb37fb9e71
commit 9bc1576fc7
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 6 additions and 18 deletions

View File

@ -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}[]