Actions53
- Message Actions
- Channel Actions
- Thread Actions
- Reaction Actions
- Guild (Server) Actions
- Member Actions
- Role Actions
- Voice Actions
- DM Actions
- Webhook Actions
- Invite Actions
Overview
This node allows interaction with Discord's API to perform various operations on Discord threads, specifically including the ability to leave a thread. It is useful for automating Discord bot actions such as managing thread membership, creating threads, archiving, and deleting threads. For example, a bot can automatically leave a thread when a certain condition is met or manage thread membership dynamically.
Use Case Examples
- A bot leaving a thread after a discussion ends.
- Automating thread management by joining or leaving threads based on user activity.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The ID of the thread to perform the leave operation on, required for identifying the specific thread. |
| Additional Fields | Optional fields that can be used to provide extra parameters for the operation, such as embed JSON, TTS flag, reason for action, and other Discord-specific settings. |
Output
JSON
success- Indicates if the leave operation was successful.threadId- The ID of the thread that was left.left- Boolean indicating the thread was left (true).
Dependencies
- Discord API
- Bot token credential
Troubleshooting
- Ensure the provided Thread ID is valid and the bot has permission to leave the thread.
- Common errors include 'Thread not found' if the thread ID is incorrect or the thread is not accessible.
- Permission errors may occur if the bot lacks the necessary permissions to leave the thread.
Links
- Discord.js ThreadChannel.leave() - Official documentation for the leave method on Discord thread channels.