Skip to content

Commit

Permalink
Merge branch 'main' into feat/connection-service
Browse files Browse the repository at this point in the history
  • Loading branch information
imnaiyar authored Aug 23, 2024
2 parents 8ea7028 + f019f0f commit ef3aa9b
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 63 deletions.
4 changes: 2 additions & 2 deletions deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
Expand Down Expand Up @@ -1415,7 +1415,7 @@ export interface APIEmbedField {
}

/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**
Expand Down
4 changes: 2 additions & 2 deletions deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
*
Expand Down Expand Up @@ -1382,7 +1382,7 @@ export interface APIEmbedField {
}

/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**
Expand Down
19 changes: 7 additions & 12 deletions deno/rest/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
Expand Down Expand Up @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO
export type APIMessageReferenceSend = RESTAPIMessageReference;

/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface RESTAPIAttachment {
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};

/**
* https://discord.com/developers/docs/resources/channel#create-message
Expand Down Expand Up @@ -461,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v10/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};
Expand Down
19 changes: 7 additions & 12 deletions deno/rest/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} from '../../payloads/v9/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
Expand Down Expand Up @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO
export type APIMessageReferenceSend = RESTAPIMessageReference;

/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface RESTAPIAttachment {
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};

/**
* https://discord.com/developers/docs/resources/channel#create-message
Expand Down Expand Up @@ -477,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v9/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
Expand Down Expand Up @@ -1415,7 +1415,7 @@ export interface APIEmbedField {
}

/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**
Expand Down
4 changes: 2 additions & 2 deletions payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export interface APIMessage {
/**
* Any attached files
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
*
Expand Down Expand Up @@ -1382,7 +1382,7 @@ export interface APIEmbedField {
}

/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface APIAttachment {
/**
Expand Down
19 changes: 7 additions & 12 deletions rest/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
import type { RESTAPIPoll } from './poll';
Expand Down Expand Up @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO
export type APIMessageReferenceSend = RESTAPIMessageReference;

/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface RESTAPIAttachment {
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};

/**
* https://discord.com/developers/docs/resources/channel#create-message
Expand Down Expand Up @@ -461,7 +456,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion rest/v10/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};
Expand Down
19 changes: 7 additions & 12 deletions rest/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
SortOrderType,
ForumLayoutType,
ChannelFlags,
APIAttachment,
} from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
import type { RESTAPIPoll } from './poll';
Expand Down Expand Up @@ -260,22 +261,16 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO
export type APIMessageReferenceSend = RESTAPIMessageReference;

/**
* https://discord.com/developers/docs/resources/channel#attachment-object
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
export interface RESTAPIAttachment {
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
> & {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
};

/**
* https://discord.com/developers/docs/resources/channel#create-message
Expand Down Expand Up @@ -477,7 +472,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion rest/v9/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
*/
attachments?: RESTAPIAttachment[] | undefined;
};
Expand Down

0 comments on commit ef3aa9b

Please sign in to comment.