UNPKG

n8n-nodes-discord-trigger

Version:

A node that triggers a workflow whenever a message from discord is sent.

60 lines (59 loc) 1.64 kB
import { type INodeType, type INodeExecutionData, type INodeTypeDescription, type INodePropertyOptions, type IExecuteFunctions } from 'n8n-workflow'; export interface IDiscordInteractionMessageParameters { token: string; executionId: string; triggerPlaceholder: boolean; triggerChannel: boolean; channelId: string; embed: boolean; title: string; description: string; url: string; color: string; timestamp: string; footerText: string; footerIconUrl: string; imageUrl: string; thumbnailUrl: string; authorName: string; authorIconUrl: string; authorUrl: string; fields: { field?: { name: string; value: string; inline: boolean; }[]; }; mentionRoles: string[]; content: string; files: { file?: { url: string; }[]; }; } export interface IDiscordNodeActionParameters { executionId: string; triggerPlaceholder: boolean; triggerChannel: boolean; channelId: string; guildId: string; apiKey: string; baseUrl: string; actionType: string; removeMessagesNumber: number; userId?: string; roleUpdateIds?: string[] | string; } export declare class DiscordInteraction implements INodeType { description: INodeTypeDescription; methods: { loadOptions: { getChannels(): Promise<INodePropertyOptions[]>; getRoles(): Promise<INodePropertyOptions[]>; getGuilds(): Promise<INodePropertyOptions[]>; }; }; execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>; }