fix(isInteractionButton): handle ButtonStyle.Premium (#1135)

This commit is contained in:
Danial Raza
2024-11-05 23:36:46 +02:00
committed by GitHub
parent d673e5f9bb
commit 736479cab3
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
* @returns A boolean that indicates if the button has a `custom_id` attached to it
*/
export function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId {
return component.style !== ButtonStyle.Link;
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Message Components
+1 -1
View File
@@ -111,7 +111,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
* @returns A boolean that indicates if the button has a `custom_id` attached to it
*/
export function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId {
return component.style !== ButtonStyle.Link;
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Message Components
+1 -1
View File
@@ -111,7 +111,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
* @returns A boolean that indicates if the button has a `custom_id` attached to it
*/
export function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId {
return component.style !== ButtonStyle.Link;
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Message Components
+1 -1
View File
@@ -111,7 +111,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
* @returns A boolean that indicates if the button has a `custom_id` attached to it
*/
export function isInteractionButton(component: APIButtonComponent): component is APIButtonComponentWithCustomId {
return component.style !== ButtonStyle.Link;
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Message Components