# types/discord.types.ts

> 22 lines of code and 5 definitions.

Tree: Bane's Lab Deploy
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/deploy#file-deploy-types-discord-types-ts
Source text: https://banes-lab.com/source/deploy/types/discord.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/deploy/types.md), after [types/deployment.types.ts](https://banes-lab.com/source/deploy/types/deployment.types.ts.md).

## Definitions

- `EmbedField` (interface_declaration, line 1, exported)
- `Embed` (interface_declaration, line 7, exported)
- `Attachment` (interface_declaration, line 15, exported)
- `WebhookMessage` (interface_declaration, line 20, exported)
- `WebhookRequest` (type_alias_declaration, line 26, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/deploy/folder-deploy-types.md)

## Source

```typescript
export interface EmbedField {
    readonly inline: boolean;
    readonly name: string;
    readonly value: string;
}

export interface Embed {
    readonly color: number;
    readonly fields: readonly EmbedField[];
    readonly thumbnail: { readonly url: string };
    readonly timestamp: string;
    readonly title: string;
}

export interface Attachment {
    readonly content: string;
    readonly name: string;
}

export interface WebhookMessage {
    readonly attachment: Attachment | null;
    readonly content: string;
    readonly embed: Embed;
}

export type WebhookRequest = NonNullable<Parameters<typeof fetch>[1]>;
```
