mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
feat: add components to /builders (#7195)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
15
packages/builders/src/components/Component.ts
Normal file
15
packages/builders/src/components/Component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { APIMessageComponent, ComponentType } from 'discord-api-types/v9';
|
||||
|
||||
/**
|
||||
* Represents a discord component
|
||||
*/
|
||||
export interface Component {
|
||||
/**
|
||||
* The type of this component
|
||||
*/
|
||||
readonly type: ComponentType;
|
||||
/**
|
||||
* Converts this component to an API-compatible JSON object
|
||||
*/
|
||||
toJSON: () => APIMessageComponent;
|
||||
}
|
||||
Reference in New Issue
Block a user