Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

feat(MessageButton): builder and associated interfaces #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 115 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"homepage": "https://github.com/discordjs/builders#readme",
"dependencies": {
"discord-api-types": "^0.18.1",
"ow": "^0.26.0",
"tslib": "^2.3.0"
},
"devDependencies": {
Expand Down
27 changes: 27 additions & 0 deletions src/components/BaseComponent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* https://discord.com/developers/docs/interactions/message-components
*/
export interface APIBaseComponent {
Copy link
Member

@vladfrangu vladfrangu Jul 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these exported?

Second thought, I know why, i'll fix this today

/**
* The type of the component
*/
type: ComponentType;
}

/**
* https://discord.com/developers/docs/interactions/message-components#component-types
*/
export enum ComponentType {
/**
* ActionRow component
*/
ActionRow = 1,
/**
* Button component
*/
Button,
/**
* Select Menu component
*/
SelectMenu,
}
Loading