mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-02 08:50:09 +00:00
fix(isInteractionButton): handle ButtonStyle.Premium (#1135)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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