n8n/packages/nodes-base/nodes/Discord/Interfaces.ts
agobrech 310bffe713
feat(Discord Node): Add additional options (#2918)
* 🔖 Discord Node v2.0

* Updated image from png to svg

* Added correct versioning

* Added old for versioning purposes

* Added other parameter for the url

* Fixed subtitle added multipart option for payload

* Removed unused imports

* Changed data type for binary file

* Removed console.log

* Moved the additional fields to an option field + fixed some bugs

* Refactored node into one version

* Removed any type

* Fixed some broken behaviour

* Minor fixes for discord node

*  Fix parameter name

Co-authored-by: Timeraa <me@timeraa.dev>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-04-15 10:04:27 +02:00

34 lines
635 B
TypeScript

// tslint:disable: no-any
export interface DiscordWebhook {
content?: string;
username?: string;
avatar_url?: string;
tts?: boolean;
file?: Buffer;
embeds?: any[];
allowed_mentions?: {
parse: Array<'roles' | 'users' | 'everyone'>;
roles: string[];
users: string[];
replied_user: boolean;
};
flags?: number;
attachments?: DiscordAttachment[];
components?: any[];
payload_json?: any;
}
export interface DiscordAttachment {
id?: string;
filename?: string;
size?: number;
description?: string;
content_type?: string;
url?: string;
proxy_url?: string;
height?: number;
width?: number;
ephemeral?: boolean;
}