mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 17:27:14 +02:00
30 lines
618 B
TypeScript
30 lines
618 B
TypeScript
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
export class DiscordWebhookApi implements ICredentialType {
|
|
name = 'discordWebhookApi';
|
|
|
|
displayName = 'Discord Webhook';
|
|
|
|
documentationUrl = 'discord';
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Webhook URL',
|
|
name: 'webhookUri',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
placeholder: 'https://discord.com/api/webhooks/ID/TOKEN',
|
|
typeOptions: {
|
|
password: true,
|
|
},
|
|
},
|
|
];
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: '={{ $credentials.webhookUri }}',
|
|
},
|
|
};
|
|
}
|