@conflict/beta
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -48,2 +48,4 @@ import View from './view.js' | ||
this.createdTimestamp = interaction.createdTimestamp; | ||
this.values = interaction.values; | ||
@@ -50,0 +52,0 @@ } |
@@ -5,4 +5,6 @@ import ActionRow from './components/dist/ActionRow.js'; | ||
import Attachment from './components/dist/Attachment.js'; | ||
import SelectMenu from './components/dist/SelectMenu.js'; | ||
import SelectOption from './components/dist/SelectOption.js'; | ||
export { ActionRow, Button, Embed, Attachment } | ||
export default { ActionRow, Button, Embed, Attachment } | ||
export { ActionRow, Button, Embed, Attachment, SelectMenu, SelectOption } | ||
export default { ActionRow, Button, Embed, Attachment, SelectMenu, SelectOption } |
@@ -1,2 +0,1 @@ | ||
import { MessageAttachment } from 'discord.js'; | ||
export default function Attachment({ | ||
@@ -3,0 +2,0 @@ url, |
@@ -10,3 +10,4 @@ import { managers } from '../../state.js'; | ||
emoji, | ||
variant | ||
variant, | ||
onClick | ||
}) { | ||
@@ -61,3 +62,4 @@ console.log('[children]', children); | ||
if (!customId && !url && !onclick) throw new Error('Button must have either customId, url, or onclick props'); | ||
if (!customId && !url && !onclick && !onClick) throw new Error('Button must have either customId, url, or onclick props'); | ||
if (!onclick && onClick) onclick = onClick; | ||
let props = { | ||
@@ -64,0 +66,0 @@ style, |
import { managers } from '../../state.js'; | ||
export default function Button ({ style, onclick, customId, url, label, children, emoji, variant }) { | ||
export default function Button ({ style, onclick, customId, url, label, children, emoji, variant, onClick }) { | ||
console.log('[children]', children); | ||
@@ -56,3 +56,4 @@ console.log('[label]', label); | ||
if (!customId && !url && !onclick) throw new Error('Button must have either customId, url, or onclick props'); | ||
if (!customId && !url && !onclick && !onClick) throw new Error('Button must have either customId, url, or onclick props'); | ||
if (!onclick && onClick) onclick = onClick; | ||
let props = { | ||
@@ -59,0 +60,0 @@ style, |
{ | ||
"name": "@conflict/beta", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "The first and only UI framework for Discord bots", | ||
@@ -5,0 +5,0 @@ "main": "exports.js", |
@@ -39,3 +39,3 @@ import Discord from 'discord.js'; | ||
if (child.tag.endsWith('_arr')) child.tag = child.tag.substring(0, child.tag.length - 4) + ('$' + Date.now() + index + 'R' + '$'); // Allow for multiple elements with the same tag, so long as it ends with _arr | ||
if (child.tag && child.tag.endsWith && child.tag.endsWith('_arr')) child.tag = child.tag.substring(0, child.tag.length - 4) + ('$' + Date.now() + index + 'R' + '$'); // Allow for multiple elements with the same tag, so long as it ends with _arr | ||
@@ -42,0 +42,0 @@ // if (!object[child.tag] && child.tag === 'embeds') object[child.tag] = []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45186
27
1262