fix: unsafe embed builder field normalization (#7418)

This commit is contained in:
Suneet Tipirneni
2022-02-07 05:52:10 -05:00
committed by GitHub
parent a921ec7dc5
commit b936103395
4 changed files with 22 additions and 9 deletions

View File

@@ -1,15 +1,12 @@
import type { APIMessageComponent, ComponentType } from 'discord-api-types/v9';
import type { JSONEncodable } from '../util/jsonEncodable';
/**
* Represents a discord component
*/
export interface Component {
export interface Component extends JSONEncodable<APIMessageComponent> {
/**
* The type of this component
*/
readonly type: ComponentType;
/**
* Converts this component to an API-compatible JSON object
*/
toJSON: () => APIMessageComponent;
}