File tree Expand file tree Collapse file tree 3 files changed +0
-4
lines changed
Expand file tree Collapse file tree 3 files changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ describe('Button Components', () => {
5151 } ) . not . toThrowError ( ) ;
5252
5353 expect ( ( ) => {
54- // @ts -expect-error: discord-api-types.
5554 const button = buttonComponent ( ) . setSKUId ( '123456789012345678' ) . setStyle ( ButtonStyle . Premium ) ;
5655 button . toJSON ( ) ;
5756 } ) . not . toThrowError ( ) ;
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export function validateRequiredButtonParameters(
8484 skuId ?: string ,
8585 url ?: string ,
8686) {
87- // @ts -expect-error discord-api-types.
8887 if ( style === ButtonStyle . Premium ) {
8988 if ( ! skuId ) {
9089 throw new RangeError ( 'Premium buttons must have an SKU id.' ) ;
Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
9797 * @param skuId - The SKU id to use
9898 */
9999 public setSKUId ( skuId : Snowflake ) {
100- // @ts -expect-error discord-api-types.
101100 ( this . data as APIButtonComponentWithSKUId ) . sku_id = skuId ;
102101 return this ;
103102 }
@@ -141,7 +140,6 @@ export class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
141140 ( this . data as Exclude < APIButtonComponent , APIButtonComponentWithSKUId > ) . label ,
142141 ( this . data as Exclude < APIButtonComponent , APIButtonComponentWithSKUId > ) . emoji ,
143142 ( this . data as APIButtonComponentWithCustomId ) . custom_id ,
144- // @ts -expect-error discord-api-types.
145143 ( this . data as APIButtonComponentWithSKUId ) . sku_id ,
146144 ( this . data as APIButtonComponentWithURL ) . url ,
147145 ) ;
You can’t perform that action at this time.
0 commit comments