mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
@@ -19,7 +19,8 @@ describe('Interaction with_response overloads.', () => {
|
|||||||
api.interactions.reply(SNOWFLAKE, TOKEN, { with_response: true }),
|
api.interactions.reply(SNOWFLAKE, TOKEN, { with_response: true }),
|
||||||
));
|
));
|
||||||
|
|
||||||
test('Replying returns undefined.', () => assertType<Promise<undefined>>(api.interactions.reply(SNOWFLAKE, TOKEN, {})));
|
test('Replying returns undefined.', () =>
|
||||||
|
assertType<Promise<undefined>>(api.interactions.reply(SNOWFLAKE, TOKEN, {})));
|
||||||
|
|
||||||
test('Defer returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
test('Defer returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
||||||
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
||||||
@@ -33,21 +34,24 @@ describe('Interaction with_response overloads.', () => {
|
|||||||
api.interactions.deferMessageUpdate(SNOWFLAKE, TOKEN, { with_response: true }),
|
api.interactions.deferMessageUpdate(SNOWFLAKE, TOKEN, { with_response: true }),
|
||||||
));
|
));
|
||||||
|
|
||||||
test('Defer message update returns undefined.', () => assertType<Promise<undefined>>(api.interactions.deferMessageUpdate(SNOWFLAKE, TOKEN, {})));
|
test('Defer message update returns undefined.', () =>
|
||||||
|
assertType<Promise<undefined>>(api.interactions.deferMessageUpdate(SNOWFLAKE, TOKEN, {})));
|
||||||
|
|
||||||
test('Update message returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
test('Update message returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
||||||
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
||||||
api.interactions.updateMessage(SNOWFLAKE, TOKEN, { with_response: true }),
|
api.interactions.updateMessage(SNOWFLAKE, TOKEN, { with_response: true }),
|
||||||
));
|
));
|
||||||
|
|
||||||
test('Update message returns undefined.', () => assertType<Promise<undefined>>(api.interactions.updateMessage(SNOWFLAKE, TOKEN, {})));
|
test('Update message returns undefined.', () =>
|
||||||
|
assertType<Promise<undefined>>(api.interactions.updateMessage(SNOWFLAKE, TOKEN, {})));
|
||||||
|
|
||||||
test('Create autocomplete response returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
test('Create autocomplete response returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
||||||
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
||||||
api.interactions.createAutocompleteResponse(SNOWFLAKE, TOKEN, { with_response: true }),
|
api.interactions.createAutocompleteResponse(SNOWFLAKE, TOKEN, { with_response: true }),
|
||||||
));
|
));
|
||||||
|
|
||||||
test('Create autocomplete response returns undefined.', () => assertType<Promise<undefined>>(api.interactions.createAutocompleteResponse(SNOWFLAKE, TOKEN, {})));
|
test('Create autocomplete response returns undefined.', () =>
|
||||||
|
assertType<Promise<undefined>>(api.interactions.createAutocompleteResponse(SNOWFLAKE, TOKEN, {})));
|
||||||
|
|
||||||
test('Create modal returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
test('Create modal returns RESTPostAPIInteractionCallbackWithResponseResult.', () =>
|
||||||
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
assertType<Promise<RESTPostAPIInteractionCallbackWithResponseResult>>(
|
||||||
|
|||||||
Reference in New Issue
Block a user