chore(deps): bump discord-api-types (#10841)

* chore(deps): bump discord-api-types

* chore: tests

* chore: tests 2

* chore: replace ImageSize type with dtypes type
This commit is contained in:
Vlad Frangu
2025-04-22 20:12:34 +03:00
committed by GitHub
parent 8f35dfd039
commit 42ce116226
19 changed files with 112 additions and 74 deletions

View File

@@ -2,7 +2,7 @@ import {
ButtonStyle,
ComponentType,
type APIActionRowComponent,
type APIMessageActionRowComponent,
type APIComponentInMessageActionRow,
} from 'discord-api-types/v10';
import { describe, test, expect } from 'vitest';
import {
@@ -13,7 +13,7 @@ import {
StringSelectMenuOptionBuilder,
} from '../../src/index.js';
const rowWithButtonData: APIActionRowComponent<APIMessageActionRowComponent> = {
const rowWithButtonData: APIActionRowComponent<APIComponentInMessageActionRow> = {
type: ComponentType.ActionRow,
components: [
{
@@ -25,7 +25,7 @@ const rowWithButtonData: APIActionRowComponent<APIMessageActionRowComponent> = {
],
};
const rowWithSelectMenuData: APIActionRowComponent<APIMessageActionRowComponent> = {
const rowWithSelectMenuData: APIActionRowComponent<APIComponentInMessageActionRow> = {
type: ComponentType.ActionRow,
components: [
{
@@ -50,7 +50,7 @@ const rowWithSelectMenuData: APIActionRowComponent<APIMessageActionRowComponent>
describe('Action Row Components', () => {
describe('Assertion Tests', () => {
test('GIVEN valid JSON input THEN valid JSON output is given', () => {
const actionRowData: APIActionRowComponent<APIMessageActionRowComponent> = {
const actionRowData: APIActionRowComponent<APIComponentInMessageActionRow> = {
type: ComponentType.ActionRow,
components: [
{
@@ -73,7 +73,7 @@ describe('Action Row Components', () => {
});
test('GIVEN valid builder options THEN valid JSON output is given', () => {
const rowWithButtonData: APIActionRowComponent<APIMessageActionRowComponent> = {
const rowWithButtonData: APIActionRowComponent<APIComponentInMessageActionRow> = {
type: ComponentType.ActionRow,
components: [
{
@@ -85,7 +85,7 @@ describe('Action Row Components', () => {
],
};
const rowWithSelectMenuData: APIActionRowComponent<APIMessageActionRowComponent> = {
const rowWithSelectMenuData: APIActionRowComponent<APIComponentInMessageActionRow> = {
type: ComponentType.ActionRow,
components: [
{

View File

@@ -3,7 +3,7 @@ import {
ComponentType,
TextInputStyle,
type APIButtonComponent,
type APIMessageActionRowComponent,
type APIComponentInMessageActionRow,
type APISelectMenuComponent,
type APITextInputComponent,
type APIActionRowComponent,
@@ -27,7 +27,7 @@ describe('createComponentBuilder', () => {
);
test('GIVEN an action row component THEN returns a ActionRowBuilder', () => {
const actionRow: APIActionRowComponent<APIMessageActionRowComponent> = {
const actionRow: APIActionRowComponent<APIComponentInMessageActionRow> = {
components: [],
type: ComponentType.ActionRow,
};