mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-09-17 08:47:24 +00:00
fix(isInteractionButton): handle ButtonStyle.Premium (#1135)
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user