Markoudstaal / node-red-contrib-discord-advanced

Recieve, send, edit and delete Discord messages in node-red.
MIT License
46 stars 16 forks source link

node-red-contrib-discord-advanced

npm version

Node-red nodes that allow you to interact with Discord, via Discord.js.

Currently the following actions are supported:

This repository builds on node-red-contrib-discord by Joris vd Donk . The main intention is to add more features and keep the repository updated.

Installation and documentation

The Wiki is still being written when it comes to documentation but you can find a guide on how to install and setup the nodes here.

Nodes

node-red-contrib-discord-advanced gives you access to 10 nodes:

Changelog

See CHANGELOG.md for more info, including information regarding breaking changes per version.

Key migration points from 3.4.x to 3.5.0

Native behavior of discord interactions

When a command is sent by an user, discord displays messages like "Bot is thinking...". Versions < 3.4 of node-red-contrib-discord-advanced manage this interaction by replying with a default text message. From 3.5.0, this library always defers replies and updates, keeping in memory the reference to the interaction in order to interact moments later within the flow with the new node discordInteractionManager.

Replacing discordMessageManager for discordInteractionManager

Now all interactions are replied with discordInteractionManager node, so there are several scenarios for having in mind. This is a breaking change. It's mandatory to take a look on examples to prevent broken flows.

Examples

Privileged Intents for correct functioning

Support, issues and feature requests

For support in setting up and feature requests you can contact me on this discord. Issues can also be reported there but prefferably via GitHub.

Discord.js client sharing

All nodes share Discord.js clients based on the discord-token that they were configured with. That means that, when you add many discordMessage nodes configured with the exact same token, only a single connection with Discord will be made.