n8n-nodes-discord-trigger
Version:
A node that triggers a workflow whenever a message from discord is sent.
59 lines • 1.98 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DiscordBotTriggerApi = void 0;
class DiscordBotTriggerApi {
constructor() {
this.name = 'discordBotTriggerApi';
this.displayName = 'Discord Bot Trigger API';
this.documentationUrl = 'https://github.com/katerlol/n8n-discord-trigger';
this.properties = [
{
displayName: 'Client ID',
name: 'clientId',
description: 'The OAuth2 client ID of the Discord App',
type: 'string',
default: '',
},
{
displayName: 'Bot Token',
name: 'token',
description: 'The bot token of the Discord App',
type: 'string',
typeOptions: { password: true },
default: '',
},
{
displayName: 'n8n API key',
name: 'apiKey',
description: 'The API key of the n8n server',
type: 'string',
typeOptions: { password: true },
default: '',
},
{
displayName: 'Base URL',
name: 'baseUrl',
description: 'The API URL of the n8n instance',
type: 'string',
default: '',
placeholder: 'https://n8n.example.com/api/v1',
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bot {{$credentials.token}}',
},
},
};
this.test = {
request: {
baseURL: 'https://discord.com/api/v10/',
url: '/users/@me/guilds',
},
};
}
}
exports.DiscordBotTriggerApi = DiscordBotTriggerApi;
//# sourceMappingURL=DiscordBotTriggerApi.credentials.js.map